[zypp-commit] r11122 - in /trunk/libzypp: libzypp.spec.cmake zypp/Product.cc zypp/Product.h zypp/Repository.cc zypp/Repository.h zypp/sat/SolvAttr.cc zypp/sat/SolvAttr.h
Author: dmacvicar Date: Mon Sep 22 15:08:14 2008 New Revision: 11122 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11122&view=rev Log: add products/keywords to repository add cpename to product Modified: trunk/libzypp/libzypp.spec.cmake trunk/libzypp/zypp/Product.cc trunk/libzypp/zypp/Product.h trunk/libzypp/zypp/Repository.cc trunk/libzypp/zypp/Repository.h trunk/libzypp/zypp/sat/SolvAttr.cc trunk/libzypp/zypp/sat/SolvAttr.h Modified: trunk/libzypp/libzypp.spec.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/libzypp.spec.cmake?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/libzypp.spec.cmake (original) +++ trunk/libzypp/libzypp.spec.cmake Mon Sep 22 15:08:14 2008 @@ -24,7 +24,7 @@ Provides: yast2-packagemanager Obsoletes: yast2-packagemanager BuildRequires: cmake -BuildRequires: libsatsolver-devel >= 0.10.11 openssl-devel +BuildRequires: libsatsolver-devel >= 0.10.13 openssl-devel BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel %if 0%{?suse_version} Modified: trunk/libzypp/zypp/Product.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.cc?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/Product.cc (original) +++ trunk/libzypp/zypp/Product.cc Mon Sep 22 15:08:14 2008 @@ -144,6 +144,9 @@ std::string Product::updaterepoKey() const { return lookupStrAttribute( sat::SolvAttr::productUpdaterepoKey ); } + std::string Product::cpeName() const + { return lookupStrAttribute( sat::SolvAttr::productCpeName ); } + std::liststd::string Product::flags() const { std::liststd::string ret; Modified: trunk/libzypp/zypp/Product.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.h?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/Product.h (original) +++ trunk/libzypp/zypp/Product.h Mon Sep 22 15:08:14 2008 @@ -75,6 +75,14 @@ */ std::string updaterepoKey() const; + /** + * The Common Platform Enumeration name + * for this product. + * + * See http://cpe.mitre.org + */ + std::string cpeName() const; + /** The product flags */ std::liststd::string flags() const; Modified: trunk/libzypp/zypp/Repository.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.cc?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/Repository.cc (original) +++ trunk/libzypp/zypp/Repository.cc Mon Sep 22 15:08:14 2008 @@ -123,6 +123,12 @@ return Date(); } + Repository::Keywords Repository::keywords() const + { return Keywords(sat::SolvAttr::repositoryKeywords); } + + Repository::Products Repository::products() const + { return Products(sat::SolvAttr::repositoryProducts); } + bool Repository::maybeOutdated() const { // system repo is not mirrored Modified: trunk/libzypp/zypp/Repository.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/Repository.h (original) +++ trunk/libzypp/zypp/Repository.h Mon Sep 22 15:08:14 2008 @@ -48,6 +48,8 @@ typedef sat::detail::size_type size_type; typedef sat::detail::RepoIdType IdType; typedef sat::ArrayAttrstd::string,std::string UpdateKeys; + typedef sat::ArrayAttrstd::string,std::string Keywords; + typedef sat::ArrayAttrstd::string,std::string Products; public: /** Default ctor creates \ref noRepository.*/ @@ -134,6 +136,17 @@ zypp::Date suggestedExpirationTimestamp() const; /** + * repository keywords (tags) + */ + Keywords keywords() const; + + /** + * Products this repository claims it is + * built for. + */ + Products products() const; + + /** * The suggested expiration date of this repository * already passed * Modified: trunk/libzypp/zypp/sat/SolvAttr.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.cc?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/SolvAttr.cc (original) +++ trunk/libzypp/zypp/sat/SolvAttr.cc Mon Sep 22 15:08:14 2008 @@ -109,11 +109,14 @@ const SolvAttr SolvAttr::productRegisterRelease( PRODUCT_REGISTER_RELEASE ); const SolvAttr SolvAttr::productUrl( PRODUCT_URL ); const SolvAttr SolvAttr::productUrlType( PRODUCT_URL_TYPE ); + const SolvAttr SolvAttr::productCpeName( PRODUCT_CPE_NAME ); // repository const SolvAttr SolvAttr::repositoryTimestamp ( REPOSITORY_TIMESTAMP ); const SolvAttr SolvAttr::repositoryExpire ( REPOSITORY_EXPIRE ); const SolvAttr SolvAttr::repositoryUpdates ( REPOSITORY_UPDATES ); + const SolvAttr SolvAttr::repositoryProducts ( REPOSITORY_PRODUCTS ); + const SolvAttr SolvAttr::repositoryKeywords ( REPOSITORY_KEYWORDS ); } // namespace sat ///////////////////////////////////////////////////////////////// Modified: trunk/libzypp/zypp/sat/SolvAttr.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.h?rev=11122&r1=11121&r2=11122&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/SolvAttr.h (original) +++ trunk/libzypp/zypp/sat/SolvAttr.h Mon Sep 22 15:08:14 2008 @@ -134,6 +134,8 @@ static const SolvAttr productRegisterRelease; static const SolvAttr productUrl; static const SolvAttr productUrlType; + static const SolvAttr productCpeName; + //@} /** \name repository */ @@ -141,6 +143,9 @@ static const SolvAttr repositoryTimestamp; static const SolvAttr repositoryExpire; static const SolvAttr repositoryUpdates; + static const SolvAttr repositoryKeywords; + static const SolvAttr repositoryProducts; + //@} //@} -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
dmacvicar@svn.opensuse.org