ref: refs/heads/ma-misc
commit f9e7e443167f09882cc4194aeb6f2a02b26166ec
Author: Michael Andres
Date: Wed Oct 14 16:25:39 2009 +0200
Add Product::droplist: List of dropped packages.
---
zypp/Product.cc | 3 +++
zypp/Product.h | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/zypp/Product.cc b/zypp/Product.cc
index 50b9d54..b8c0441 100644
--- a/zypp/Product.cc
+++ b/zypp/Product.cc
@@ -128,6 +128,9 @@ namespace zypp
return ret;
}
+ CapabilitySet Product::droplist() const
+ { return poolItem().buddy().valuesOfNamespace( "weakremover" ); }
+
std::string Product::productLine() const
{ return lookupStrAttribute( sat::SolvAttr::productProductLine ); }
diff --git a/zypp/Product.h b/zypp/Product.h
index f25ecc3..88c4b66 100644
--- a/zypp/Product.h
+++ b/zypp/Product.h
@@ -48,6 +48,26 @@ namespace zypp
.*/
std::string referenceFilename() const;
+ /** List of packages included in older versions of this product and now dropped.
+ *
+ * This evaluates the \ref referencePackage \c weakremover namespace. It actually
+ * returns a \ref CapabilitySet, because we support to drop specific versions or
+ * version ranges of a package. Use \ref sat::WhatProvides to get the actually
+ * installed and available packages matching this list.
+ * \code
+ * const Product & openSUSE;
+ * sat::WhatProvides droped( openSUSE.droplist() );
+ * for_( it, droped.poolItemBegin(), dropped.poolItemEnd() )
+ * {
+ * if ( it->status().isInstalled() )
+ * {
+ * MIL << "Installed but no longer supported package: " << *it << endl;
+ * }
+ * }
+ * \endcode
+ */
+ CapabilitySet droplist() const;
+
public:
/***/
typedef std::vector<constPtr> ReplacedProducts;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org