libzypp: zypp/ui/SelectableImpl.h Source File

libzypp 17.25.10

SelectableImpl.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_UI_SELECTABLEIMPL_H
13 #define ZYPP_UI_SELECTABLEIMPL_H
14
15 #include <iostream>
16 #include <zypp/base/LogTools.h>
17
18 #include <zypp/base/PtrTypes.h>
19
20 #include <zypp/ResPool.h>
21 #include <zypp/Resolver.h>
22 #include <zypp/ui/Selectable.h>
23 #include <zypp/ui/SelectableTraits.h>
24
25 using std::endl;
26
28 namespace zypp
29 {
31 namespace ui
32 {
33
35 //
36 // CLASS NAME : Selectable::Impl
37 //
42 struct Selectable::Impl
43 {
44 public:
45
46 typedef SelectableTraits::AvailableItemSet AvailableItemSet;
47 typedef SelectableTraits::available_iterator available_iterator;
48 typedef SelectableTraits::available_const_iterator available_const_iterator;
49 typedef SelectableTraits::available_size_type available_size_type;
50
51 typedef SelectableTraits::InstalledItemSet InstalledItemSet;
52 typedef SelectableTraits::installed_iterator installed_iterator;
53 typedef SelectableTraits::installed_const_iterator installed_const_iterator;
54 typedef SelectableTraits::installed_size_type installed_size_type;
55
56 typedef SelectableTraits::PickList PickList;
57
58 public:
59 template <class TIterator>
60 Impl( const ResKind & kind_r,
61 const std::string & name_r,
62 TIterator begin_r,
63 TIterator end_r )
64 : _ident( sat::Solvable::SplitIdent( kind_r, name_r ).ident() )
65 , _kind( kind_r )
66 , _name( name_r )
67 {
68 for_( it, begin_r, end_r )
69 {
70 if ( it->status().isInstalled() )
71 _installedItems.insert( *it );
72 else
73 _availableItems.insert( *it );
74 }
75 }
76
77 public:
79 IdString ident() const
80 { return _ident; }
81
83 ResKind kind() const
84 { return _kind; }
85
87 const std::string & name() const
88 { return _name; }
89
91 Status status() const;
92
94 bool setStatus( Status state_r, ResStatus::TransactByValue causer_r );
95
97 PoolItem installedObj() const
98 {
99 if ( installedEmpty() )
100 return PoolItem();
101 PoolItem ret( transactingInstalled() );
102 return ret ? ret : *_installedItems.begin();
103 }
104
109 PoolItem candidateObj() const
110 {
111 PoolItem ret( transactingCandidate() );
112 if ( ! ret )
113 ret = _candidate ? _candidate : defaultCandidate();
114 return ret;
115 }
116
121 PoolItem setCandidate( const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r );
122
128 PoolItem candidateObjFrom( Repository repo_r ) const
129 {
130 for ( const PoolItem & pi : available() )
131 {
132 if ( pi.isRetracted() )
133 continue;
134 if ( pi.repository() == repo_r )
135 return pi;
136 }
137 return PoolItem();
138 }
139
146 PoolItem updateCandidateObj() const
147 {
148 PoolItem defaultCand( defaultCandidate() );
149
150 // multiversionInstall: This returns the candidate for the last
151 // instance installed. Actually we'd need a list here.
152
153 if ( ! defaultCand || defaultCand.isRetracted() )
154 return PoolItem();
155
156 if ( installedEmpty() )
157 return defaultCand;
158 // Here: installed and defaultCand are non NULL and it's not a
159 // multiversion install.
160
161 PoolItem installed( installedObj() );
162 // check vendor change
163 if ( ! ( ResPool::instance().resolver().allowVendorChange()
164 || VendorAttr::instance().equivalent( defaultCand->vendor(), installed->vendor() ) ) )
165 return PoolItem();
166
167 // check arch change (arch noarch changes are allowed)
168 if ( defaultCand->arch() != installed->arch()
169 && ! ( defaultCand->arch() == Arch_noarch || installed->arch() == Arch_noarch ) )
170 return PoolItem();
171
172 // check greater edition
173 if ( defaultCand->edition() <= installed->edition() )
174 return PoolItem();
175
176 return defaultCand;
177 }
178
180 PoolItem highestAvailableVersionObj() const
181 {
182 PoolItem ret;
183 bool retractedOk = false;
184 for ( const PoolItem & pi : available() )
185 {
186 if ( !retractedOk && pi.isRetracted() )
187 {
188 if ( ret )
189 break; // prefer a not retracted candidate
190 retractedOk = true;
191 }
192 if ( !ret || pi.edition() > ret.edition() )
193 ret = pi;
194 }
195 return ret;
196 }
197
199 bool identIsAutoInstalled() const
200 { return sat::Solvable::identIsAutoInstalled( ident() ); }
201
203 bool identicalAvailable( const PoolItem & rhs ) const
204 { return bool(identicalAvailableObj( rhs )); }
205
207 bool identicalInstalled( const PoolItem & rhs ) const
208 { return bool(identicalInstalledObj( rhs )); }
209
211 PoolItem identicalAvailableObj( const PoolItem & rhs ) const
212 {
213 if ( !availableEmpty() && rhs )
214 {
215 for_( it, _availableItems.begin(), _availableItems.end() )
216 {
217 if ( identical( *it, rhs ) )
218 return *it;
219 }
220 }
221 return PoolItem();
222 }
223
225 PoolItem identicalInstalledObj( const PoolItem & rhs ) const
226 {
227 if ( !installedEmpty() && rhs )
228 {
229 for_( it, _installedItems.begin(), _installedItems.end() )
230 {
231 if ( identical( *it, rhs ) )
232 return *it;
233 }
234 }
235 return PoolItem();
236 }
237
239 PoolItem theObj() const
240 {
241 PoolItem ret( candidateObj() );
242 if ( ret )
243 return ret;
244 return installedObj();
245 }
246
248
249 bool availableEmpty() const
250 { return _availableItems.empty(); }
251
252 available_size_type availableSize() const
253 { return _availableItems.size(); }
254
255 available_iterator availableBegin() const
256 { return _availableItems.begin(); }
257
258 available_iterator availableEnd() const
259 { return _availableItems.end(); }
260
261 inline Iterable<available_iterator> available() const
262 { return makeIterable( availableBegin(), availableEnd() ); }
263
265
266 bool installedEmpty() const
267 { return _installedItems.empty(); }
268
269 installed_size_type installedSize() const
270 { return _installedItems.size(); }
271
272 installed_iterator installedBegin() const
273 { return _installedItems.begin(); }
274
275 installed_iterator installedEnd() const
276 { return _installedItems.end(); }
277
278 inline Iterable<installed_iterator> installed() const
279 { return makeIterable( installedBegin(), installedEnd() ); }
280
282
283 const PickList & picklist() const
284 {
285 if ( ! _picklistPtr )
286 {
287 _picklistPtr.reset( new PickList );
288 // installed without identical avaialble first:
289 for ( const PoolItem & pi : installed() )
290 {
291 if ( ! identicalAvailable( pi ) )
292 _picklistPtr->push_back( pi );
293 }
294 _picklistPtr->insert( _picklistPtr->end(), availableBegin(), availableEnd() );
295 }
296 return *_picklistPtr;
297 }
298
299 bool picklistEmpty() const
300 { return picklist().empty(); }
301
302 picklist_size_type picklistSize() const
303 { return picklist().size(); }
304
305 picklist_iterator picklistBegin() const
306 { return picklist().begin(); }
307
308 picklist_iterator picklistEnd() const
309 { return picklist().end(); }
310
312
313 bool hasRetracted() const
314 { return !_availableItems.empty() && _availableItems.rbegin()->isRetracted(); }
315
316 bool hasRetractedInstalled() const
317 {
318 bool ret = false;
319 if ( hasRetracted() )
320 {
321 for ( const PoolItem & ipi : installed() )
322 {
323 PoolItem pi { identicalAvailableObj( ipi ) };
324 if ( pi && pi.isRetracted() )
325 {
326 ret = true;
327 break;
328 }
329 }
330 }
331 return ret;
332 // later if pool index is available:
333 // for ( const PoolItem & pi : installed() )
334 // if ( pi.isRetracted() )
335 // return true;
336 // return false;
337 }
338
339 bool isUnmaintained() const
340 { return availableEmpty(); }
341
342 bool multiversionInstall() const
343 {
344 for ( const PoolItem & pi : picklist() )
345 {
346 if ( pi.multiversionInstall() )
347 return true;
348 }
349 return false;
350 }
351
352 bool pickInstall( const PoolItem & pi_r, ResStatus::TransactByValue causer_r, bool yesno_r );
353
354 bool pickDelete( const PoolItem & pi_r, ResStatus::TransactByValue causer_r, bool yesno_r );
355
356 Status pickStatus( const PoolItem & pi_r ) const;
357
358 bool setPickStatus( const PoolItem & pi_r, Status state_r, ResStatus::TransactByValue causer_r );
359
361
362 bool isUndetermined() const
363 {
364 PoolItem cand( candidateObj() );
365 return ! cand || cand.isUndetermined();
366 }
367 bool isRelevant() const
368 {
369 PoolItem cand( candidateObj() );
370 return cand && cand.isRelevant();
371 }
372 bool isSatisfied() const
373 {
374 PoolItem cand( candidateObj() );
375 return cand && cand.isSatisfied();
376 }
377 bool isBroken() const
378 {
379 PoolItem cand( candidateObj() );
380 return cand && cand.isBroken();
381 }
382
384 ResStatus::TransactByValue modifiedBy() const;
385
387 bool hasLicenceConfirmed() const
388 { return candidateObj() && candidateObj().status().isLicenceConfirmed(); }
389
391 void setLicenceConfirmed( bool val_r )
392 { if ( candidateObj() ) candidateObj().status().setLicenceConfirmed( val_r ); }
393
395 bool hasLocks() const
396 {
397 for ( const PoolItem & pi : available() )
398 {
399 if ( pi.status().isLocked() )
400 return true;
401 }
402 for ( const PoolItem & pi : installed() )
403 {
404 if ( pi.status().isLocked() )
405 return true;
406 }
407 return false;
408 }
409
410 private:
411 PoolItem transactingInstalled() const
412 {
413 for ( const PoolItem & pi : installed() )
414 {
415 if ( pi.status().transacts() )
416 return pi;
417 }
418 return PoolItem();
419 }
420
421 PoolItem transactingCandidate() const
422 {
423 for ( const PoolItem & pi : available() )
424 {
425 if ( pi.status().transacts() )
426 return pi;
427 }
428 return PoolItem();
429 }
430
431 PoolItem defaultCandidate() const
432 {
433 if ( ! installedEmpty() )
434 {
435 // prefer the installed objects arch and vendor
436 bool solver_allowVendorChange( ResPool::instance().resolver().allowVendorChange() );
437 for ( const PoolItem & ipi : installed() )
438 {
439 PoolItem sameArch; // in case there's no same vendor at least stay with same arch.
440 for ( const PoolItem & api : available() )
441 {
442 // 'same arch' includes allowed changes to/from noarch.
443 if ( ipi.arch() == api.arch() || ipi.arch() == Arch_noarch || api.arch() == Arch_noarch )
444 {
445 if ( ! solver_allowVendorChange )
446 {
447 if ( VendorAttr::instance().equivalent( ipi, api ) )
448 return api;
449 else if ( ! sameArch ) // remember best same arch in case no same vendor found
450 sameArch = api;
451 }
452 else // same arch is sufficient
453 return api;
454 }
455 }
456 if ( sameArch )
457 return sameArch;
458 }
459 }
460 if ( _availableItems.empty() )
461 return PoolItem();
462
463 return *_availableItems.begin();
464 }
465
466 bool allCandidatesLocked() const
467 {
468 for ( const PoolItem & pi : available() )
469 {
470 if ( ! pi.status().isLocked() )
471 return false;
472 }
473 return( ! _availableItems.empty() );
474 }
475
476 bool allInstalledLocked() const
477 {
478 for ( const PoolItem & pi : installed() )
479 {
480 if ( ! pi.status().isLocked() )
481 return false;
482 }
483 return( ! _installedItems.empty() );
484 }
485
486
487 private:
488 const IdString _ident;
489 const ResKind _kind;
490 const std::string _name;
491 InstalledItemSet _installedItems;
492 AvailableItemSet _availableItems;
494 PoolItem _candidate;
496 mutable scoped_ptr<PickList> _picklistPtr;
497 };
499
501 inline std::ostream & operator<<( std::ostream & str, const Selectable::Impl & obj )
502 {
503 return str << '[' << obj.kind() << ']' << obj.name() << ": " << obj.status()
504 << " (I " << obj.installedSize() << ")"
505 << " (A " << obj.availableSize() << ")"
506 << obj.candidateObj();
507 }
508
510 inline std::ostream & dumpOn( std::ostream & str, const Selectable::Impl & obj )
511 {
512 str << '[' << obj.kind() << ']' << obj.name() << ": " << obj.status()
513 << ( obj.multiversionInstall() ? " (multiversion)" : "") << endl;
514
515 if ( obj.installedEmpty() )
516 str << " (I 0) {}" << endl << " ";
517 else
518 {
519 PoolItem icand( obj.installedObj() );
520 str << " (I " << obj.installedSize() << ") {" << endl;
521 for ( const PoolItem & pi : obj.installed() )
522 {
523 char t = ' ';
524 if ( pi == icand )
525 {
526 t = 'i';
527 }
528 str << " " << t << " " << pi << endl;
529 }
530 str << "} ";
531 }
532
533 if ( obj.availableEmpty() )
534 {
535 str << "(A 0) {}" << endl << " ";
536 }
537 else
538 {
539 PoolItem cand( obj.candidateObj() );
540 PoolItem up( obj.updateCandidateObj() );
541 str << "(A " << obj.availableSize() << ") {" << endl;
542 for ( const PoolItem & pi : obj.available() )
543 {
544 char t = ' ';
545 if ( pi == cand )
546 {
547 t = pi == up ? 'C' : 'c';
548 }
549 else if ( pi == up )
550 {
551 t = 'u';
552 }
553 str << " " << t << " " << pi << endl;
554 }
555 str << "} ";
556 }
557
558 if ( obj.picklistEmpty() )
559 {
560 str << "(P 0) {}";
561 }
562 else
563 {
564 PoolItem cand( obj.candidateObj() );
565 PoolItem up( obj.updateCandidateObj() );
566 str << "(P " << obj.picklistSize() << ") {" << endl;
567 for ( const PoolItem & pi : obj.picklist() )
568 {
569 char t = ' ';
570 if ( pi == cand )
571 {
572 t = pi == up ? 'C' : 'c';
573 }
574 else if ( pi == up )
575 {
576 t = 'u';
577 }
578 str << " " << t << " " << pi << "\t" << obj.pickStatus( pi ) << endl;
579 }
580 str << "} ";
581 }
582
583 return str;
584 }
586 } // namespace ui
589 } // namespace zypp
591 #endif // ZYPP_UI_SELECTABLEIMPL_H
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition: Easy.h:28
LogTools.h
PtrTypes.h
ResPool.h
Resolver.h
SelectableTraits.h
Selectable.h
zypp::IdString
Access to the sat-pools string space.
Definition: IdString.h:43
zypp::Iterable
Definition: Iterable.h:37
zypp::PoolItem
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:51
zypp::PoolItem::isRelevant
bool isRelevant() const
Returns true if the solvable is relevant which means e.g.
Definition: PoolItem.cc:209
zypp::PoolItem::isBroken
bool isBroken() const
Whether a relevant items requirements are broken.
Definition: PoolItem.cc:211
zypp::PoolItem::status
ResStatus & status() const
Returns the current status.
Definition: PoolItem.cc:204
zypp::PoolItem::isSatisfied
bool isSatisfied() const
Whether a relevant items requirements are met.
Definition: PoolItem.cc:210
zypp::PoolItem::isUndetermined
bool isUndetermined() const
No validation is performed for packages.
Definition: PoolItem.cc:208
zypp::Repository
Definition: Repository.h:40
zypp::ResKind
Resolvable kinds.
Definition: ResKind.h:33
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:37
zypp::ResStatus::isLicenceConfirmed
bool isLicenceConfirmed() const
Definition: ResStatus.h:175
zypp::ResStatus::setLicenceConfirmed
void setLicenceConfirmed(bool toVal_r=true)
Definition: ResStatus.h:178
zypp::ResStatus::TransactByValue
TransactByValue
Definition: ResStatus.h:107
zypp::VendorAttr::instance
static const VendorAttr & instance()
(Pseudo)Singleton, mapped to the current Target::vendorAttr settings or to noTargetInstance.
Definition: VendorAttr.cc:230
zypp::sat::Solvable::identIsAutoInstalled
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
Definition: Solvable.h:137
zypp::ui::Selectable::picklist_iterator
SelectableTraits::picklist_iterator picklist_iterator
Definition: Selectable.h:67
zypp::ui::Selectable::picklist_size_type
SelectableTraits::picklist_size_type picklist_size_type
Definition: Selectable.h:68
str
String related utilities and Regular expression matching.
zypp::sat::identical
bool identical(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: SolvableType.h:215
zypp::solver::detail::allowVendorChange
allowVendorChange
Definition: Resolver.cc:121
zypp::ui::Status
Status
UI status Status values calculated by Selectable.
Definition: Status.h:35
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::sat::SolvableType::arch
Arch arch() const
Definition: SolvableType.h:72
zypp::sat::SolvableType::vendor
IdString vendor() const
Definition: SolvableType.h:73
zypp::sat::SolvableType::edition
Edition edition() const
Definition: SolvableType.h:71
zypp::sat::SolvableType::isRetracted
bool isRetracted() const
Definition: SolvableType.h:84
zypp::ui::SelectableTraits::installed_const_iterator
AvailableItemSet::const_iterator installed_const_iterator
Definition: SelectableTraits.h:125
zypp::ui::SelectableTraits::PickList
std::vector< PoolItem > PickList
Definition: SelectableTraits.h:128
zypp::ui::SelectableTraits::available_size_type
AvailableItemSet::size_type available_size_type
Definition: SelectableTraits.h:121
zypp::ui::SelectableTraits::installed_iterator
AvailableItemSet::iterator installed_iterator
Definition: SelectableTraits.h:124
zypp::ui::SelectableTraits::available_const_iterator
AvailableItemSet::const_iterator available_const_iterator
Definition: SelectableTraits.h:120
zypp::ui::SelectableTraits::AvailableItemSet
std::set< PoolItem, AVOrder > AvailableItemSet
Definition: SelectableTraits.h:118
zypp::ui::SelectableTraits::InstalledItemSet
std::set< PoolItem, IOrder > InstalledItemSet
Definition: SelectableTraits.h:123
zypp::ui::SelectableTraits::installed_size_type
AvailableItemSet::size_type installed_size_type
Definition: SelectableTraits.h:126
zypp::ui::SelectableTraits::available_iterator
AvailableItemSet::iterator available_iterator
Definition: SelectableTraits.h:119
zypp::ui::Selectable::Impl
Selectable implementation.
Definition: SelectableImpl.h:43
zypp::ui::Selectable::Impl::installedObj
PoolItem installedObj() const
Installed object (transacting ot highest version).
Definition: SelectableImpl.h:97
zypp::ui::Selectable::Impl::isSatisfied
bool isSatisfied() const
Definition: SelectableImpl.h:372
zypp::ui::Selectable::Impl::theObj
PoolItem theObj() const
Best among all objects.
Definition: SelectableImpl.h:239
zypp::ui::Selectable::Impl::installedEnd
installed_iterator installedEnd() const
Definition: SelectableImpl.h:275
zypp::ui::Selectable::Impl::allInstalledLocked
bool allInstalledLocked() const
Definition: SelectableImpl.h:476
zypp::ui::Selectable::Impl::transactingCandidate
PoolItem transactingCandidate() const
Definition: SelectableImpl.h:421
zypp::ui::Selectable::Impl::availableEmpty
bool availableEmpty() const
Definition: SelectableImpl.h:249
zypp::ui::Selectable::Impl::transactingInstalled
PoolItem transactingInstalled() const
Definition: SelectableImpl.h:411
zypp::ui::Selectable::Impl::_candidate
PoolItem _candidate
The object selected by setCandidateObj() method.
Definition: SelectableImpl.h:494
zypp::ui::Selectable::Impl::setPickStatus
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
Definition: SelectableImpl.cc:450
zypp::ui::Selectable::Impl::picklistEmpty
bool picklistEmpty() const
Definition: SelectableImpl.h:299
zypp::ui::Selectable::Impl::_kind
const ResKind _kind
Definition: SelectableImpl.h:489
zypp::ui::Selectable::Impl::InstalledItemSet
SelectableTraits::InstalledItemSet InstalledItemSet
Definition: SelectableImpl.h:51
zypp::ui::Selectable::Impl::availableBegin
available_iterator availableBegin() const
Definition: SelectableImpl.h:255
zypp::ui::Selectable::Impl::status
Status status() const
Definition: SelectableImpl.cc:322
zypp::ui::Selectable::Impl::kind
ResKind kind() const
Definition: SelectableImpl.h:83
zypp::ui::Selectable::Impl::available_iterator
SelectableTraits::available_iterator available_iterator
Definition: SelectableImpl.h:47
zypp::ui::Selectable::Impl::isUnmaintained
bool isUnmaintained() const
Definition: SelectableImpl.h:339
zypp::ui::Selectable::Impl::available
Iterable< available_iterator > available() const
Definition: SelectableImpl.h:261
zypp::ui::Selectable::Impl::identicalInstalled
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
Definition: SelectableImpl.h:207
zypp::ui::Selectable::Impl::installedBegin
installed_iterator installedBegin() const
Definition: SelectableImpl.h:272
zypp::ui::Selectable::Impl::_name
const std::string _name
Definition: SelectableImpl.h:490
zypp::ui::Selectable::Impl::installedEmpty
bool installedEmpty() const
Definition: SelectableImpl.h:266
zypp::ui::Selectable::Impl::identicalAvailableObj
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
Definition: SelectableImpl.h:211
zypp::ui::Selectable::Impl::installed_iterator
SelectableTraits::installed_iterator installed_iterator
Definition: SelectableImpl.h:52
zypp::ui::Selectable::Impl::installed
Iterable< installed_iterator > installed() const
Definition: SelectableImpl.h:278
zypp::ui::Selectable::Impl::picklistBegin
picklist_iterator picklistBegin() const
Definition: SelectableImpl.h:305
zypp::ui::Selectable::Impl::availableEnd
available_iterator availableEnd() const
Definition: SelectableImpl.h:258
zypp::ui::Selectable::Impl::available_size_type
SelectableTraits::available_size_type available_size_type
Definition: SelectableImpl.h:49
zypp::ui::Selectable::Impl::picklist
const PickList & picklist() const
Definition: SelectableImpl.h:283
zypp::ui::Selectable::Impl::_installedItems
InstalledItemSet _installedItems
Definition: SelectableImpl.h:491
zypp::ui::Selectable::Impl::PickList
SelectableTraits::PickList PickList
Definition: SelectableImpl.h:56
zypp::ui::Selectable::Impl::installed_const_iterator
SelectableTraits::installed_const_iterator installed_const_iterator
Definition: SelectableImpl.h:53
zypp::ui::Selectable::Impl::updateCandidateObj
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
Definition: SelectableImpl.h:146
zypp::ui::Selectable::Impl::_availableItems
AvailableItemSet _availableItems
Definition: SelectableImpl.h:492
zypp::ui::Selectable::Impl::pickInstall
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
Definition: SelectableImpl.cc:438
zypp::ui::Selectable::Impl::picklistSize
picklist_size_type picklistSize() const
Definition: SelectableImpl.h:302
zypp::ui::Selectable::Impl::multiversionInstall
bool multiversionInstall() const
Definition: SelectableImpl.h:342
zypp::ui::Selectable::Impl::identicalInstalledObj
PoolItem identicalInstalledObj(const PoolItem &rhs) const
\Return an installed Object with the same content as rhs.
Definition: SelectableImpl.h:225
zypp::ui::Selectable::Impl::picklistEnd
picklist_iterator picklistEnd() const
Definition: SelectableImpl.h:308
zypp::ui::Selectable::Impl::defaultCandidate
PoolItem defaultCandidate() const
Definition: SelectableImpl.h:431
zypp::ui::Selectable::Impl::AvailableItemSet
SelectableTraits::AvailableItemSet AvailableItemSet
Definition: SelectableImpl.h:46
zypp::ui::Selectable::Impl::installed_size_type
SelectableTraits::installed_size_type installed_size_type
Definition: SelectableImpl.h:54
zypp::ui::Selectable::Impl::setStatus
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
Definition: SelectableImpl.cc:355
zypp::ui::Selectable::Impl::name
const std::string & name() const
Definition: SelectableImpl.h:87
zypp::ui::Selectable::Impl::isRelevant
bool isRelevant() const
Definition: SelectableImpl.h:367
zypp::ui::Selectable::Impl::_picklistPtr
scoped_ptr< PickList > _picklistPtr
lazy initialized picklist
Definition: SelectableImpl.h:496
zypp::ui::Selectable::Impl::modifiedBy
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
Definition: SelectableImpl.cc:642
zypp::ui::Selectable::Impl::_ident
const IdString _ident
Definition: SelectableImpl.h:488
zypp::ui::Selectable::Impl::candidateObj
PoolItem candidateObj() const
Best among available objects.
Definition: SelectableImpl.h:109
zypp::ui::Selectable::Impl::pickStatus
Status pickStatus(const PoolItem &pi_r) const
Definition: SelectableImpl.cc:573
zypp::ui::Selectable::Impl::dumpOn
std::ostream & dumpOn(std::ostream &str, const Selectable::Impl &obj)
Stream output.
Definition: SelectableImpl.h:510
zypp::ui::Selectable::Impl::identicalAvailable
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
Definition: SelectableImpl.h:203
zypp::ui::Selectable::Impl::isBroken
bool isBroken() const
Definition: SelectableImpl.h:377
zypp::ui::Selectable::Impl::highestAvailableVersionObj
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
Definition: SelectableImpl.h:180
zypp::ui::Selectable::Impl::operator<<
std::ostream & operator<<(std::ostream &str, const Selectable::Impl &obj)
Stream output.
Definition: SelectableImpl.h:501
zypp::ui::Selectable::Impl::Impl
Impl(const ResKind &kind_r, const std::string &name_r, TIterator begin_r, TIterator end_r)
Definition: SelectableImpl.h:60
zypp::ui::Selectable::Impl::setLicenceConfirmed
void setLicenceConfirmed(bool val_r)
Set LicenceConfirmed bit.
Definition: SelectableImpl.h:391
zypp::ui::Selectable::Impl::setCandidate
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
Set a userCandidate (out of available objects).
Definition: SelectableImpl.cc:396
zypp::ui::Selectable::Impl::isUndetermined
bool isUndetermined() const
Definition: SelectableImpl.h:362
zypp::ui::Selectable::Impl::candidateObjFrom
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
Definition: SelectableImpl.h:128
zypp::ui::Selectable::Impl::hasLicenceConfirmed
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
Definition: SelectableImpl.h:387
zypp::ui::Selectable::Impl::identIsAutoInstalled
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
Definition: SelectableImpl.h:199
zypp::ui::Selectable::Impl::hasRetracted
bool hasRetracted() const
Definition: SelectableImpl.h:313
zypp::ui::Selectable::Impl::availableSize
available_size_type availableSize() const
Definition: SelectableImpl.h:252
zypp::ui::Selectable::Impl::hasRetractedInstalled
bool hasRetractedInstalled() const
Definition: SelectableImpl.h:316
zypp::ui::Selectable::Impl::available_const_iterator
SelectableTraits::available_const_iterator available_const_iterator
Definition: SelectableImpl.h:48
zypp::ui::Selectable::Impl::pickDelete
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
Definition: SelectableImpl.cc:445
zypp::ui::Selectable::Impl::ident
IdString ident() const
Definition: SelectableImpl.h:79
zypp::ui::Selectable::Impl::hasLocks
bool hasLocks() const
True if it includes locked items (don't mix this with the locked status).
Definition: SelectableImpl.h:395
zypp::ui::Selectable::Impl::installedSize
installed_size_type installedSize() const
Definition: SelectableImpl.h:269
zypp::ui::Selectable::Impl::allCandidatesLocked
bool allCandidatesLocked() const
Definition: SelectableImpl.h:466