From 0aee4ede8bb01c275826559e27517ddc70a03b02 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Wed, 16 Jul 2008 12:41:38 +0000 Subject: [PATCH] Add ui::Selectable::isNeeded to indicate patch relevance --- package/libzypp.changes | 6 ++++++ zypp/ui/Selectable.cc | 3 +++ zypp/ui/Selectable.h | 8 ++++++++ zypp/ui/SelectableImpl.h | 6 ++++++ 4 files changed, 23 insertions(+) diff --git a/package/libzypp.changes b/package/libzypp.changes index f3c7d79..15a2c37 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Jul 16 14:39:50 CEST 2008 - ma@suse.de + +- Add ui::Selectable::isNeeded to indicate patch relevance (bnc #409150) +- revision 10595 + +------------------------------------------------------------------- Wed Jul 16 01:10:37 CEST 2008 - ma@suse.de - Remove Atom, Script, Message and other obsolete classes. diff --git a/zypp/ui/Selectable.cc b/zypp/ui/Selectable.cc index 9359a3f..3fc349b 100644 --- a/zypp/ui/Selectable.cc +++ b/zypp/ui/Selectable.cc @@ -109,6 +109,9 @@ namespace zypp bool Selectable::isUnmaintained() const { return _pimpl->isUnmaintained(); } + bool Selectable::isNeeded() const + { return _pimpl->isNeeded(); } + ResStatus::TransactByValue Selectable::modifiedBy() const { return _pimpl->modifiedBy(); } diff --git a/zypp/ui/Selectable.h b/zypp/ui/Selectable.h index 2090731..cb622a9 100644 --- a/zypp/ui/Selectable.h +++ b/zypp/ui/Selectable.h @@ -190,6 +190,12 @@ namespace zypp */ bool isUnmaintained() const; + /** Whether the item is relevant but has broken requirements. + * A 'needed' Patch should be installed, while an 'unneeded' one + * is either applied or not relevant for the system. + */ + bool isNeeded() const; + public: /** \name Query objects fate in case of commit. */ @@ -251,6 +257,8 @@ namespace zypp /** Set LicenceConfirmed bit. */ void setLicenceConfirmed( bool val_r = true ); + + //@} public: diff --git a/zypp/ui/SelectableImpl.h b/zypp/ui/SelectableImpl.h index ef8fc18..7ac47b5 100644 --- a/zypp/ui/SelectableImpl.h +++ b/zypp/ui/SelectableImpl.h @@ -165,6 +165,12 @@ namespace zypp bool isUnmaintained() const { return availableEmpty(); } + bool isNeeded() const + { + PoolItem cand( candidateObj() ); + return cand && cand.isBroken(); + } + /** Return who caused the modification. */ ResStatus::TransactByValue modifiedBy() const; -- 2.7.4