SET(LIBZYPP_MINOR "13")
SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 5.12.0 (12)
+# LAST RELEASED: 5.13.0 (13)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
INT << "===[START]==========================================" << endl;
ZConfig::instance();
+ {
+ Capability cap("flavor(dvd9)");
+ DBG << cap.detail().isSimple() << endl;
+ DBG << cap.detail().isNamed() << endl;
+ DBG << cap.detail().name() << endl;
+ std::string capstr = str::stripPrefix( cap.asString(), "flavor(" );
+ DBG << capstr << endl;
+ capstr.erase(capstr.size()-1);
+ DBG << capstr << endl;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////
+ INT << "===[END]============================================" << endl << endl;
+ zypp::base::LogControl::instance().logNothing();
+ return 0;
+
#if 0
RepoManager repoManager( makeRepoManager( sysRoot ) );
getZYpp()->target()->load();
USR << getZYpp()->target()->targetDistribution() << endl;
USR << getZYpp()->target()->targetDistributionRelease() << endl;
- USR << getZYpp()->target()->targetDistributionFlavor() << endl;
}
}
PoolItem pi ( getPi<Package>("amarok") );
MIL << pi << endl;
- MIL << pi->as<Package>() << endl;
- MIL << pi->as<Product>() << endl;
+ MIL << pi->asKind<Package>() << endl;
+ MIL << pi->asKind<Product>() << endl;
if ( pi->isKind<Package>() )
- SEC << pi->as<Package>() << endl;
+ SEC << pi->asKind<Package>() << endl;
//////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
-------------------------------------------------------------------
+Fri Sep 26 15:37:50 CEST 2008 - ma@suse.de
+
+- Fix computation of Product::flavor.
+- Add Product::productLine. A vendor specific string denoting the
+ product line.
+- revision 11182
+- version 5.13.0 (13)
+
+-------------------------------------------------------------------
Thu Sep 25 23:19:55 CEST 2008 - jkupec@suse.cz
- ZConfig::credentialsGlobal{File,Dir}() added
if ( (*it).buddy().isKind( ResKind::product ) )
ret.push_back( make<Product>( (*it).buddy() ) );
}
-
return ret;
}
+ std::string Product::productLine() const
+ {
+#warning productLine needs to be implemented.
+ return std::string();
+ }
+
///////////////////////////////////////////////////////////////////
std::string Product::shortName() const
{ return lookupStrAttribute( sat::SolvAttr::productShortlabel ); }
std::string Product::flavor() const
- { return lookupStrAttribute( sat::SolvAttr::productFlavor ); }
+ {
+ // Look for a provider of 'product_flavor(name) = version'
+ // within the same repo. Unlike the reference package, we
+ // can be relaxed and ignore the architecture.
+ Capability identCap( str::form( "product_flavor(%s) = %s", name().c_str(), edition().c_str() ) );
+
+ sat::WhatProvides providers( identCap );
+ for_( it, providers.begin(), providers.end() )
+ {
+ if ( it->repository() == repository() )
+ {
+ // Got the package now try to get the provided 'flavor(...)'
+ Capabilities provides( it->provides() );
+ for_( cap, provides.begin(), provides.end() )
+ {
+ std::string capstr( cap.asString() );
+ if ( str::hasPrefix( capstr, "flavor(" ) )
+ {
+ capstr = str::stripPrefix( capstr, "flavor(" );
+ capstr.erase( capstr.size()-1 ); // trailing ')'
+ return capstr;
+ }
+ }
+ }
+ }
+ return std::string();
+ }
std::string Product::type() const
{ return lookupStrAttribute( sat::SolvAttr::productType ); }
/* safety checks, shouldn't happen (tm) */
if (url_type_it == url_type.end())
{
- /* FIXME: Raise exception ?! */
ERR << *this << " : The thing that should not happen, happened." << endl;
break;
}
*/
ReplacedProducts replacedProducts() const;
+ /** Vendor specific string denoting the product line. */
+ std::string productLine() const;
+
public:
/** Untranslated short name like <tt>SLES 10</tt>*/
std::string shortName() const;
const SolvAttr SolvAttr::productDistversion ( PRODUCT_DISTVERSION );
const SolvAttr SolvAttr::productType ( PRODUCT_TYPE );
const SolvAttr SolvAttr::productFlags ( PRODUCT_FLAGS );
- const SolvAttr SolvAttr::productFlavor ( PRODUCT_FLAVOR );
const SolvAttr SolvAttr::productUpdaterepoKey ( PRODUCT_UPDATEREPOKEY );
const SolvAttr SolvAttr::productRegisterTarget ( PRODUCT_REGISTER_TARGET );
const SolvAttr SolvAttr::productRegisterRelease( PRODUCT_REGISTER_RELEASE );
- const SolvAttr SolvAttr::productUrl( PRODUCT_URL );
- const SolvAttr SolvAttr::productUrlType( PRODUCT_URL_TYPE );
+ const SolvAttr SolvAttr::productUrl ( PRODUCT_URL );
+ const SolvAttr SolvAttr::productUrlType ( PRODUCT_URL_TYPE );
// 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 );
+ 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
/////////////////////////////////////////////////////////////////
static const SolvAttr productDistversion;
static const SolvAttr productType;
static const SolvAttr productFlags;
- static const SolvAttr productFlavor;
static const SolvAttr productUpdaterepoKey;
static const SolvAttr productRegisterTarget;
static const SolvAttr productRegisterRelease;