Author: mlandres Date: Thu Sep 18 09:59:45 2008 New Revision: 11089 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11089&view=rev Log: - Add Product::isTargetDistribution to identify the systems installed baseproduct. Modified: trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/Product.cc trunk/libzypp/zypp/Product.h Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11089&r1=11088&r2=11089&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Thu Sep 18 09:59:45 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Sep 18 09:57:49 CEST 2008 - ma@suse.de + +- Add Product::isTargetDistribution to identify the systems installed + baseproduct. +- revision 11089 + +------------------------------------------------------------------- Wed Sep 17 18:05:44 CEST 2008 - jkupec@suse.cz - save user credentials when adding repos/services with URLs containing Modified: trunk/libzypp/zypp/Product.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.cc?rev=11089&r1=11088&r2=11089&view=diff ============================================================================== --- trunk/libzypp/zypp/Product.cc (original) +++ trunk/libzypp/zypp/Product.cc Thu Sep 18 09:59:45 2008 @@ -151,6 +151,9 @@ return ret; } + bool Product::isTargetDistribution() const + { return isSystem() && type() == "base"; } + std::string Product::registerTarget() const { return lookupStrAttribute( sat::SolvAttr::productRegisterTarget ); } @@ -181,7 +184,7 @@ if ( url_type_it.asString() == key_r ) { - ret._list.push_back(url_it.asString()); + ret._list.push_back(url_it.asString()); } } /* while (attribute array) */ Modified: trunk/libzypp/zypp/Product.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.h?rev=11089&r1=11088&r2=11089&view=diff ============================================================================== --- trunk/libzypp/zypp/Product.h (original) +++ trunk/libzypp/zypp/Product.h Thu Sep 18 09:59:45 2008 @@ -76,17 +76,22 @@ /** The product flags */ std::liststd::string flags() const; - /** This is \c register.target attribute of an installed product. - * Used for registration. + public: + /** This is the \b installed product that is also targeted by the + * \c /etc/products.d/baseproduct symlink. */ + bool isTargetDistribution() const; + + /** This is \c register.target attribute of an \b installed product. + * Used for registration. + */ std::string registerTarget() const; - /** This is \c register.release attribute of an installed product. - * Used for registration. - */ + /** This is \c register.release attribute of an \b installed product. + * Used for registration. + */ std::string registerRelease() const; - public: /***/ class UrlList; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org