+ Package::maybeUnsupported
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Aug 2008 14:47:36 +0000 (14:47 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Aug 2008 14:47:36 +0000 (14:47 +0000)
VERSION.cmake
package/libzypp.changes
zypp/Package.cc
zypp/Package.h

index c2f7b3a..970a254 100644 (file)
@@ -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)
index 6a444a6..1a657c3 100644 (file)
@@ -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)
index 3299c26..4fb7415 100644 (file)
@@ -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;
index c97f4b3..fbfa572 100644 (file)
@@ -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;
     /** */