libzypp: zypp/ui/SelectableImpl.h Source File

libzypp 17.38.6

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-core/base/LogTools.h>
17
18#include <zypp-core/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#include <zypp/Package.h>
25
26using std::endl;
27
29namespace zypp
30{
32 namespace ui
33 {
34
36 //
37 // CLASS NAME : Selectable::Impl
38 //
43 struct Selectable::Impl
44 {
45 public:
46
47 using AvailableItemSet = SelectableTraits::AvailableItemSet;
48 using available_iterator = SelectableTraits::available_iterator;
49 using available_const_iterator = SelectableTraits::available_const_iterator;
50 using available_size_type = SelectableTraits::available_size_type;
51
52 using InstalledItemSet = SelectableTraits::InstalledItemSet;
53 using installed_iterator = SelectableTraits::installed_iterator;
54 using installed_const_iterator = SelectableTraits::installed_const_iterator;
55 using installed_size_type = SelectableTraits::installed_size_type;
56
57 using PickList = SelectableTraits::PickList;
58
59 public:
60 template <class TIterator>
61 Impl( const ResKind & kind_r,
62 const std::string & name_r,
63 TIterator begin_r,
64 TIterator end_r )
65 : _ident( sat::Solvable::SplitIdent( kind_r, name_r ).ident() )
66 , _kind( kind_r )
67 , _name( name_r )
68 {
69 for_( it, begin_r, end_r )
70 {
71 if ( it->status().isInstalled() )
72 _installedItems.insert( *it );
73 else
74 _availableItems.insert( *it );
75 }
76 }
77
78 public:
80 IdString ident() const
81 { return _ident; }
82
84 ResKind kind() const
85 { return _kind; }
86
88 const std::string & name() const
89 { return _name; }
90
92 Status status() const;
93
95 bool setStatus( Status state_r, ResStatus::TransactByValue causer_r );
96
98 PoolItem installedObj() const
99 {
100 if ( installedEmpty() )
101 return PoolItem();
102 PoolItem ret( transactingInstalled() );
103 return ret ? ret : *_installedItems.begin();
104 }
105
110 PoolItem candidateObj() const
111 {
112 PoolItem ret( transactingCandidate() );
113 if ( ! ret )
114 ret = _candidate ? _candidate : defaultCandidate();
115 return ret;
116 }
117
122 PoolItem setCandidate( const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r );
123
129 PoolItem candidateObjFrom( Repository repo_r ) const
130 {
131 for ( const PoolItem & pi : available() )
132 {
133 if ( pi.isBlacklisted() )
134 continue;
135 if ( pi.repository() == repo_r )
136 return pi;
137 }
138 return PoolItem();
139 }
140
147 PoolItem updateCandidateObj() const
148 {
149 PoolItem defaultCand( defaultCandidate() );
150
151 // multiversionInstall: This returns the candidate for the last
152 // instance installed. Actually we'd need a list here.
153
154 if ( ! defaultCand || defaultCand.isBlacklisted() )
155 return PoolItem();
156
157 if ( installedEmpty() )
158 return defaultCand;
159 // Here: installed and defaultCand are non NULL and it's not a
160 // multiversion install.
161
162 PoolItem installed( installedObj() );
163 // check vendor change
164 if ( ! ( ResPool::instance().resolver().allowVendorChange()
165 || VendorAttr::instance().equivalent( defaultCand->vendor(), installed->vendor() ) ) )
166 return PoolItem();
167
168 // check arch change (arch noarch changes are allowed)
169 if ( defaultCand->arch() != installed->arch()
170 && ! ( defaultCand->arch() == Arch_noarch || installed->arch() == Arch_noarch ) )
171 return PoolItem();
172
173 // check greater edition
174 if ( defaultCand->edition() <= installed->edition() )
175 return PoolItem();
176
177 return defaultCand;
178 }
179
181 PoolItem highestAvailableVersionObj() const
182 {
183 PoolItem ret;
184 bool blacklistedOk = false;
185 for ( const PoolItem & pi : available() )
186 {
187 if ( !blacklistedOk && pi.isBlacklisted() )
188 {
189 if ( ret )
190 break; // prefer a not retracted candidate
191 blacklistedOk = true;
192 }
193 if ( !ret || pi.edition() > ret.edition() )
194 ret = pi;
195 }
196 return ret;
197 }
198
200 bool identIsAutoInstalled() const
201 { return sat::Solvable::identIsAutoInstalled( ident() ); }
202
204 bool identicalAvailable( const PoolItem & rhs ) const
205 { return bool(identicalAvailableObj( rhs )); }
206
208 bool identicalInstalled( const PoolItem & rhs ) const
209 { return bool(identicalInstalledObj( rhs )); }
210
212 PoolItem identicalAvailableObj( const PoolItem & rhs ) const
213 {
214 if ( !availableEmpty() && rhs )
215 {
216 for_( it, _availableItems.begin(), _availableItems.end() )
217 {
218 if ( identical( *it, rhs ) )
219 return *it;
220 }
221 }
222 return PoolItem();
223 }
224
226 PoolItem identicalInstalledObj( const PoolItem & rhs ) const
227 {
228 if ( !installedEmpty() && rhs )
229 {
230 for_( it, _installedItems.begin(), _installedItems.end() )
231 {
232 if ( identical( *it, rhs ) )
233 return *it;
234 }
235 }
236 return PoolItem();
237 }
238
240 PoolItem theObj() const
241 {
242 PoolItem ret( candidateObj() );
243 if ( ret )
244 return ret;
245 return installedObj();
246 }
247
248 std::vector<std::string> supersededBy() const
249 {
250 std::vector<std::string> ret;
251 if ( kind() == ResKind::package ) {
252 for ( const PoolItem & pi : available() ) {
253 ret = pi->asKind<Package>()->supersededBy();
254 if ( not ret.empty() )
255 break;
256 }
257 }
258 return ret;
259 }
260
262
263 bool availableEmpty() const
264 { return _availableItems.empty(); }
265
266 available_size_type availableSize() const
267 { return _availableItems.size(); }
268
269 available_iterator availableBegin() const
270 { return _availableItems.begin(); }
271
272 available_iterator availableEnd() const
273 { return _availableItems.end(); }
274
275 inline Iterable<available_iterator> available() const
276 { return makeIterable( availableBegin(), availableEnd() ); }
277
279
280 bool installedEmpty() const
281 { return _installedItems.empty(); }
282
283 installed_size_type installedSize() const
284 { return _installedItems.size(); }
285
286 installed_iterator installedBegin() const
287 { return _installedItems.begin(); }
288
289 installed_iterator installedEnd() const
290 { return _installedItems.end(); }
291
292 inline Iterable<installed_iterator> installed() const
293 { return makeIterable( installedBegin(), installedEnd() ); }
294
296
297 const PickList & picklist() const
298 {
299 if ( ! _picklistPtr )
300 {
301 _picklistPtr.reset( new PickList );
302 // installed without identical avaialble first:
303 for ( const PoolItem & pi : installed() )
304 {
305 if ( ! identicalAvailable( pi ) )
306 _picklistPtr->push_back( pi );
307 }
308 _picklistPtr->insert( _picklistPtr->end(), availableBegin(), availableEnd() );
309 }
310 return *_picklistPtr;
311 }
312
313 bool picklistEmpty() const
314 { return picklist().empty(); }
315
316 picklist_size_type picklistSize() const
317 { return picklist().size(); }
318
319 picklist_iterator picklistBegin() const
320 { return picklist().begin(); }
321
322 picklist_iterator picklistEnd() const
323 { return picklist().end(); }
324
326 bool hasBlacklisted() const
327 { // Blacklisted items are sorted to the end of the available list.
328 return !_availableItems.empty() && _availableItems.rbegin()->isBlacklisted();
329 }
330
331 bool hasBlacklistedInstalled() const
332 { // Blacklisted items may be embedded in the installed list.
333 for ( const PoolItem & pi : installed() ) {
334 if ( pi.isBlacklisted() )
335 return true;
336 }
337 return false;
338 }
339
340 bool hasRetracted() const
341 {
342 for ( const PoolItem & pi : makeIterable( _availableItems.rbegin(), _availableItems.rend() ) ) {
343 if ( not pi.isBlacklisted() )
344 break;
345 if ( pi.isRetracted() )
346 return true;
347 }
348 return false;
349 }
350
351 bool hasRetractedInstalled() const
352 {
353 for ( const PoolItem & pi : installed() ) {
354 if ( pi.isRetracted() )
355 return true;
356 }
357 return false;
358 }
359
360 bool hasPtf() const
361 {
362 for ( const PoolItem & pi : makeIterable( _availableItems.rbegin(), _availableItems.rend() ) ) {
363 if ( not pi.isBlacklisted() )
364 break;
365 if ( pi.isPtf() )
366 return true;
367 }
368 return false;
369 }
370
371 bool hasPtfInstalled() const
372 {
373 for ( const PoolItem & pi : installed() ) {
374 if ( pi.isPtf() )
375 return true;
376 }
377 return false;
378 }
379
380
381 bool isUnmaintained() const
382 { return availableEmpty(); }
383
384 bool multiversionInstall() const
385 {
386 for ( const PoolItem & pi : picklist() )
387 {
388 if ( pi.multiversionInstall() )
389 return true;
390 }
391 return false;
392 }
393
394 bool pickInstall( const PoolItem & pi_r, ResStatus::TransactByValue causer_r, bool yesno_r );
395
396 bool pickDelete( const PoolItem & pi_r, ResStatus::TransactByValue causer_r, bool yesno_r );
397
398 Status pickStatus( const PoolItem & pi_r ) const;
399
400 bool setPickStatus( const PoolItem & pi_r, Status state_r, ResStatus::TransactByValue causer_r );
401
403
404 bool isUndetermined() const
405 {
406 PoolItem cand( candidateObj() );
407 return ! cand || cand.isUndetermined();
408 }
409 bool isRelevant() const
410 {
411 PoolItem cand( candidateObj() );
412 return cand && cand.isRelevant();
413 }
414 bool isSatisfied() const
415 {
416 PoolItem cand( candidateObj() );
417 return cand && cand.isSatisfied();
418 }
419 bool isBroken() const
420 {
421 PoolItem cand( candidateObj() );
422 return cand && cand.isBroken();
423 }
424
426 ResStatus::TransactByValue modifiedBy() const;
427
429 bool hasLicenceConfirmed() const
430 { return candidateObj() && candidateObj().status().isLicenceConfirmed(); }
431
433 void setLicenceConfirmed( bool val_r )
434 { if ( candidateObj() ) candidateObj().status().setLicenceConfirmed( val_r ); }
435
437 bool hasLocks() const
438 {
439 for ( const PoolItem & pi : available() )
440 {
441 if ( pi.status().isLocked() )
442 return true;
443 }
444 for ( const PoolItem & pi : installed() )
445 {
446 if ( pi.status().isLocked() )
447 return true;
448 }
449 return false;
450 }
451
452 private:
453 PoolItem transactingInstalled() const
454 {
455 for ( const PoolItem & pi : installed() )
456 {
457 if ( pi.status().transacts() )
458 return pi;
459 }
460 return PoolItem();
461 }
462
463 PoolItem transactingCandidate() const
464 {
465 for ( const PoolItem & pi : available() )
466 {
467 if ( pi.status().transacts() )
468 return pi;
469 }
470 return PoolItem();
471 }
472
473 PoolItem defaultCandidate() const
474 {
475 if ( ! installedEmpty() )
476 {
477 // prefer the installed objects arch and vendor
478 bool solver_allowVendorChange( ResPool::instance().resolver().allowVendorChange() );
479 for ( const PoolItem & ipi : installed() )
480 {
481 PoolItem sameArch; // in case there's no same vendor at least stay with same arch.
482 for ( const PoolItem & api : available() )
483 {
484 // 'same arch' includes allowed changes to/from noarch.
485 if ( ipi.arch() == api.arch() || ipi.arch() == Arch_noarch || api.arch() == Arch_noarch )
486 {
487 if ( ! solver_allowVendorChange )
488 {
489 if ( VendorAttr::instance().equivalent( ipi, api ) )
490 return api;
491 else if ( ! sameArch ) // remember best same arch in case no same vendor found
492 sameArch = api;
493 }
494 else // same arch is sufficient
495 return api;
496 }
497 }
498 if ( sameArch )
499 return sameArch;
500 }
501 }
502 if ( _availableItems.empty() )
503 return PoolItem();
504
505 return *_availableItems.begin();
506 }
507
508 bool allCandidatesLocked() const
509 {
510 for ( const PoolItem & pi : available() )
511 {
512 if ( ! pi.status().isLocked() )
513 return false;
514 }
515 return( ! _availableItems.empty() );
516 }
517
518 bool allInstalledLocked() const
519 {
520 for ( const PoolItem & pi : installed() )
521 {
522 if ( ! pi.status().isLocked() )
523 return false;
524 }
525 return( ! _installedItems.empty() );
526 }
527
528
529 private:
530 const IdString _ident;
531 const ResKind _kind;
532 const std::string _name;
533 InstalledItemSet _installedItems;
534 AvailableItemSet _availableItems;
536 PoolItem _candidate;
538 mutable scoped_ptr<PickList> _picklistPtr;
539 };
540
541
543 inline std::ostream & operator<<( std::ostream & str, const Selectable::Impl & obj )
544 {
545 return str << '[' << obj.kind() << ']' << obj.name() << ": " << obj.status()
546 << " (I " << obj.installedSize() << ")"
547 << " (A " << obj.availableSize() << ")"
548 << obj.candidateObj();
549 }
550
552 inline std::ostream & dumpOn( std::ostream & str, const Selectable::Impl & obj )
553 {
554 str << '[' << obj.kind() << ']' << obj.name() << ": " << obj.status()
555 << ( obj.multiversionInstall() ? " (multiversion)" : "") << endl;
556
557 if ( obj.installedEmpty() )
558 str << " (I 0) {}" << endl << " ";
559 else
560 {
561 PoolItem icand( obj.installedObj() );
562 str << " (I " << obj.installedSize() << ") {" << endl;
563 for ( const PoolItem & pi : obj.installed() )
564 {
565 char t = ' ';
566 if ( pi == icand )
567 {
568 t = 'i';
569 }
570 str << " " << t << " " << pi << endl;
571 }
572 str << "} ";
573 }
574
575 if ( obj.availableEmpty() )
576 {
577 str << "(A 0) {}" << endl << " ";
578 }
579 else
580 {
581 PoolItem cand( obj.candidateObj() );
582 PoolItem up( obj.updateCandidateObj() );
583 str << "(A " << obj.availableSize() << ") {" << endl;
584 for ( const PoolItem & pi : obj.available() )
585 {
586 char t = ' ';
587 if ( pi == cand )
588 {
589 t = pi == up ? 'C' : 'c';
590 }
591 else if ( pi == up )
592 {
593 t = 'u';
594 }
595 str << " " << t << " " << pi << endl;
596 }
597 str << "} ";
598 }
599
600 if ( obj.picklistEmpty() )
601 {
602 str << "(P 0) {}";
603 }
604 else
605 {
606 PoolItem cand( obj.candidateObj() );
607 PoolItem up( obj.updateCandidateObj() );
608 str << "(P " << obj.picklistSize() << ") {" << endl;
609 for ( const PoolItem & pi : obj.picklist() )
610 {
611 char t = ' ';
612 if ( pi == cand )
613 {
614 t = pi == up ? 'C' : 'c';
615 }
616 else if ( pi == up )
617 {
618 t = 'u';
619 }
620 str << " " << t << " " << pi << "\t" << obj.pickStatus( pi ) << endl;
621 }
622 str << "} ";
623 }
624
625 return str;
626 }
627
628 } // namespace ui
631} // namespace zypp
633#endif // ZYPP_UI_SELECTABLEIMPL_H
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition Easy.h:27
LogTools.h
Package.h
PtrTypes.h
ResPool.h
Resolver.h
SelectableTraits.h
Selectable.h
bool
scoped_ptr
zypp::IdString
Access to the sat-pools string space.
Definition IdString.h:55
zypp::Iterable
Definition Iterable.h:37
zypp::Package
Package interface.
Definition Package.h:34
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:218
zypp::PoolItem::isBroken
bool isBroken() const
Whether a relevant items requirements are broken.
Definition PoolItem.cc:220
zypp::PoolItem::status
ResStatus & status() const
Returns the current status.
Definition PoolItem.cc:212
zypp::PoolItem::isSatisfied
bool isSatisfied() const
Whether a relevant items requirements are met.
Definition PoolItem.cc:219
zypp::PoolItem::isUndetermined
bool isUndetermined() const
No validation is performed for packages.
Definition PoolItem.cc:217
zypp::Repository
Definition Repository.h:40
zypp::ResKind
Resolvable kinds.
Definition ResKind.h:33
zypp::ResKind::package
static const ResKind package
Definition ResKind.h:40
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition ResPool.cc:38
zypp::ResStatus::isLicenceConfirmed
bool isLicenceConfirmed() const
Definition ResStatus.h:181
zypp::ResStatus::setLicenceConfirmed
void setLicenceConfirmed(bool toVal_r=true)
Definition ResStatus.h:184
zypp::ResStatus::TransactByValue
TransactByValue
Definition ResStatus.h:108
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:146
zypp::ui::Selectable::picklist_size_type
SelectableTraits::picklist_size_type picklist_size_type
Definition Selectable.h:69
zypp::ui::Selectable::picklist_iterator
SelectableTraits::picklist_iterator picklist_iterator
Definition Selectable.h:68
str
String related utilities and Regular expression matching.
zypp::sat
Libsolv interface
zypp::ui
Definition SolvIterMixin.cc:77
zypp::ui::Status
Status
UI status Status values calculated by Selectable.
Definition Status.h:36
zypp::ui::operator<<
std::ostream & operator<<(std::ostream &str, const Selectable &obj)
relates: Selectable Stream output
Definition Selectable.cc:331
zypp::ui::dumpOn
std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
relates: Selectable More verbose stream output
Definition Selectable.cc:334
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::makeIterable
Iterable< TIterator > makeIterable(TIterator &&begin_r, TIterator &&end_r)
relates: Iterable convenient construction.
Definition Iterable.h:88
zypp::sat::SolvableType::isBlacklisted
bool isBlacklisted() const
Definition SolvableType.h:90
zypp::sat::SolvableType::edition
Edition edition() const
Definition SolvableType.h:71
zypp::ui::SelectableTraits::available_size_type
AvailableItemSet::size_type available_size_type
Definition SelectableTraits.h:121
zypp::ui::SelectableTraits::AvailableItemSet
std::set< PoolItem, AVOrder > AvailableItemSet
Definition SelectableTraits.h:118
zypp::ui::SelectableTraits::available_iterator
AvailableItemSet::iterator available_iterator
Definition SelectableTraits.h:119
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::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::installed_size_type
AvailableItemSet::size_type installed_size_type
Definition SelectableTraits.h:126
zypp::ui::SelectableTraits::InstalledItemSet
std::set< PoolItem, IOrder > InstalledItemSet
Definition SelectableTraits.h:123
zypp::ui::Selectable::Impl
Selectable implementation.
Definition SelectableImpl.h:44
zypp::ui::Selectable::Impl::installedObj
PoolItem installedObj() const
Installed object (transacting ot highest version).
Definition SelectableImpl.h:98
zypp::ui::Selectable::Impl::isSatisfied
bool isSatisfied() const
Definition SelectableImpl.h:414
zypp::ui::Selectable::Impl::theObj
PoolItem theObj() const
Best among all objects.
Definition SelectableImpl.h:240
zypp::ui::Selectable::Impl::installedEnd
installed_iterator installedEnd() const
Definition SelectableImpl.h:289
zypp::ui::Selectable::Impl::AvailableItemSet
SelectableTraits::AvailableItemSet AvailableItemSet
Definition SelectableImpl.h:47
zypp::ui::Selectable::Impl::allInstalledLocked
bool allInstalledLocked() const
Definition SelectableImpl.h:518
zypp::ui::Selectable::Impl::transactingCandidate
PoolItem transactingCandidate() const
Definition SelectableImpl.h:463
zypp::ui::Selectable::Impl::installed_const_iterator
SelectableTraits::installed_const_iterator installed_const_iterator
Definition SelectableImpl.h:54
zypp::ui::Selectable::Impl::availableEmpty
bool availableEmpty() const
Definition SelectableImpl.h:263
zypp::ui::Selectable::Impl::transactingInstalled
PoolItem transactingInstalled() const
Definition SelectableImpl.h:453
zypp::ui::Selectable::Impl::_candidate
PoolItem _candidate
The object selected by setCandidateObj() method.
Definition SelectableImpl.h:536
zypp::ui::Selectable::Impl::installed_iterator
SelectableTraits::installed_iterator installed_iterator
Definition SelectableImpl.h:53
zypp::ui::Selectable::Impl::InstalledItemSet
SelectableTraits::InstalledItemSet InstalledItemSet
Definition SelectableImpl.h:52
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::name
const std::string & name() const
Definition SelectableImpl.h:88
zypp::ui::Selectable::Impl::picklistEmpty
bool picklistEmpty() const
Definition SelectableImpl.h:313
zypp::ui::Selectable::Impl::_kind
const ResKind _kind
Definition SelectableImpl.h:531
zypp::ui::Selectable::Impl::availableBegin
available_iterator availableBegin() const
Definition SelectableImpl.h:269
zypp::ui::Selectable::Impl::status
Status status() const
Definition SelectableImpl.cc:322
zypp::ui::Selectable::Impl::kind
ResKind kind() const
Definition SelectableImpl.h:84
zypp::ui::Selectable::Impl::isUnmaintained
bool isUnmaintained() const
Definition SelectableImpl.h:381
zypp::ui::Selectable::Impl::PickList
SelectableTraits::PickList PickList
Definition SelectableImpl.h:57
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:208
zypp::ui::Selectable::Impl::installedBegin
installed_iterator installedBegin() const
Definition SelectableImpl.h:286
zypp::ui::Selectable::Impl::_name
const std::string _name
Definition SelectableImpl.h:532
zypp::ui::Selectable::Impl::available_const_iterator
SelectableTraits::available_const_iterator available_const_iterator
Definition SelectableImpl.h:49
zypp::ui::Selectable::Impl::installedEmpty
bool installedEmpty() const
Definition SelectableImpl.h:280
zypp::ui::Selectable::Impl::installed_size_type
SelectableTraits::installed_size_type installed_size_type
Definition SelectableImpl.h:55
zypp::ui::Selectable::Impl::identicalAvailableObj
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
Definition SelectableImpl.h:212
zypp::ui::Selectable::Impl::picklistBegin
picklist_iterator picklistBegin() const
Definition SelectableImpl.h:319
zypp::ui::Selectable::Impl::availableEnd
available_iterator availableEnd() const
Definition SelectableImpl.h:272
zypp::ui::Selectable::Impl::available_iterator
SelectableTraits::available_iterator available_iterator
Definition SelectableImpl.h:48
zypp::ui::Selectable::Impl::_installedItems
InstalledItemSet _installedItems
Definition SelectableImpl.h:533
zypp::ui::Selectable::Impl::supersededBy
std::vector< std::string > supersededBy() const
Definition SelectableImpl.h:248
zypp::ui::Selectable::Impl::updateCandidateObj
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
Definition SelectableImpl.h:147
zypp::ui::Selectable::Impl::_availableItems
AvailableItemSet _availableItems
Definition SelectableImpl.h:534
zypp::ui::Selectable::Impl::installed
Iterable< installed_iterator > installed() const
Definition SelectableImpl.h:292
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::hasPtf
bool hasPtf() const
Definition SelectableImpl.h:360
zypp::ui::Selectable::Impl::picklistSize
picklist_size_type picklistSize() const
Definition SelectableImpl.h:316
zypp::ui::Selectable::Impl::multiversionInstall
bool multiversionInstall() const
Definition SelectableImpl.h:384
zypp::ui::Selectable::Impl::available
Iterable< available_iterator > available() const
Definition SelectableImpl.h:275
zypp::ui::Selectable::Impl::identicalInstalledObj
PoolItem identicalInstalledObj(const PoolItem &rhs) const
\Return an installed Object with the same content as rhs.
Definition SelectableImpl.h:226
zypp::ui::Selectable::Impl::hasPtfInstalled
bool hasPtfInstalled() const
Definition SelectableImpl.h:371
zypp::ui::Selectable::Impl::available_size_type
SelectableTraits::available_size_type available_size_type
Definition SelectableImpl.h:50
zypp::ui::Selectable::Impl::picklistEnd
picklist_iterator picklistEnd() const
Definition SelectableImpl.h:322
zypp::ui::Selectable::Impl::defaultCandidate
PoolItem defaultCandidate() const
Definition SelectableImpl.h:473
zypp::ui::Selectable::Impl::setStatus
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
Definition SelectableImpl.cc:355
zypp::ui::Selectable::Impl::isRelevant
bool isRelevant() const
Definition SelectableImpl.h:409
zypp::ui::Selectable::Impl::_picklistPtr
scoped_ptr< PickList > _picklistPtr
lazy initialized picklist
Definition SelectableImpl.h:538
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:530
zypp::ui::Selectable::Impl::hasBlacklistedInstalled
bool hasBlacklistedInstalled() const
Definition SelectableImpl.h:331
zypp::ui::Selectable::Impl::candidateObj
PoolItem candidateObj() const
Best among available objects.
Definition SelectableImpl.h:110
zypp::ui::Selectable::Impl::pickStatus
Status pickStatus(const PoolItem &pi_r) const
Definition SelectableImpl.cc:573
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:204
zypp::ui::Selectable::Impl::isBroken
bool isBroken() const
Definition SelectableImpl.h:419
zypp::ui::Selectable::Impl::highestAvailableVersionObj
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
Definition SelectableImpl.h:181
zypp::ui::Selectable::Impl::Impl
Impl(const ResKind &kind_r, const std::string &name_r, TIterator begin_r, TIterator end_r)
Definition SelectableImpl.h:61
zypp::ui::Selectable::Impl::setLicenceConfirmed
void setLicenceConfirmed(bool val_r)
Set LicenceConfirmed bit.
Definition SelectableImpl.h:433
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:404
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:129
zypp::ui::Selectable::Impl::hasLicenceConfirmed
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
Definition SelectableImpl.h:429
zypp::ui::Selectable::Impl::hasBlacklisted
bool hasBlacklisted() const
Definition SelectableImpl.h:326
zypp::ui::Selectable::Impl::identIsAutoInstalled
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
Definition SelectableImpl.h:200
zypp::ui::Selectable::Impl::hasRetracted
bool hasRetracted() const
Definition SelectableImpl.h:340
zypp::ui::Selectable::Impl::availableSize
available_size_type availableSize() const
Definition SelectableImpl.h:266
zypp::ui::Selectable::Impl::hasRetractedInstalled
bool hasRetractedInstalled() const
Definition SelectableImpl.h:351
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:80
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:437
zypp::ui::Selectable::Impl::installedSize
installed_size_type installedSize() const
Definition SelectableImpl.h:283
zypp::ui::Selectable::Impl::allCandidatesLocked
bool allCandidatesLocked() const
Definition SelectableImpl.h:508
zypp::ui::Selectable::Impl::picklist
const PickList & picklist() const
Definition SelectableImpl.h:297