From cfc9a28a9464432f73feec8148ac4b9c4237e36b Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Tue, 19 Aug 2008 14:47:36 +0000 Subject: [PATCH] + Package::maybeUnsupported --- VERSION.cmake | 4 ++-- package/libzypp.changes | 6 ++++++ zypp/Package.cc | 6 ++++++ zypp/Package.h | 6 ++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/VERSION.cmake b/VERSION.cmake index c2f7b3a..970a254 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -60,8 +60,8 @@ # SET(LIBZYPP_MAJOR "5") SET(LIBZYPP_COMPATMINOR "5") -SET(LIBZYPP_MINOR "6") -SET(LIBZYPP_PATCH "1") +SET(LIBZYPP_MINOR "7") +SET(LIBZYPP_PATCH "0") # # LAST RELEASED: 5.6.1 (5) # (The number in parenthesis is LIBZYPP_COMPATMINOR) diff --git a/package/libzypp.changes b/package/libzypp.changes index 6a444a6..1a657c3 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Aug 19 16:36:47 CEST 2008 - dmacvicar@suse.de + +- add Package::maybeUnsupported to remove duplicated + code in clients dealing with Package::vendorSupport + +------------------------------------------------------------------- Di 19. Aug 10:34:39 CEST 2008 - schubi@waerden.suse.de - Reset transaction only if this solvable has no buddy (bnc #417799) diff --git a/zypp/Package.cc b/zypp/Package.cc index 3299c26..4fb7415 100644 --- a/zypp/Package.cc +++ b/zypp/Package.cc @@ -63,6 +63,12 @@ namespace zypp return VendorSupportUnknown; } + bool Package::maybeUnsupported() const + { + return ( vendorSupport() & ( VendorSupportACC | VendorSupportUnsupported | VendorSupportUnknown ) == ( VendorSupportACC | VendorSupportUnsupported | VendorSupportUnknown ) ); + } + + Changelog Package::changelog() const { Target_Ptr target; diff --git a/zypp/Package.h b/zypp/Package.h index c97f4b3..fbfa572 100644 --- a/zypp/Package.h +++ b/zypp/Package.h @@ -50,6 +50,12 @@ namespace zypp */ VendorSupportOption vendorSupport() const; + /** + * True if the vendor support for this package + * is unknown or explictly unsupported. + */ + bool maybeUnsupported() const; + /** Get the package change log */ Changelog changelog() const; /** */ -- 2.7.4