{
Capability identCap( lookupStrAttribute( sat::SolvAttr::productReferences ) );
if ( ! identCap )
+ {
+ // No 'references': fallback to provider of 'product(name) = version'
+ // Without this solver testcase won't work, as it does not remember
+ // 'references'.
+ identCap = Capability( str::form( "product(%s) = %s", name().c_str(), edition().c_str() ) );
+ }
+ if ( ! identCap )
+ {
return sat::Solvable::noSolvable;
+ }
+
// if there is productReferences defined, we expect
// a matching package within the same repo.
return sat::Solvable::noSolvable;
}
+ std::string Product::shortName() const
+ { return lookupStrAttribute( sat::SolvAttr::productShortlabel ); }
+
std::string Product::flavor() const
{ return lookupStrAttribute( sat::SolvAttr::productFlavor ); }
return ret;
}
- std::string Product::shortName() const
- { return lookupStrAttribute( sat::SolvAttr::productShortlabel ); }
-
- std::string Product::longName( const Locale & lang_r ) const
- { return summary( lang_r ); }
-
std::string Product::distributionName() const
{ return lookupStrAttribute( sat::SolvAttr::productDistproduct ); }
sat::Solvable referencePackage() const;
public:
- /** The product flavor (LiveCD Demo, FTP edition,...).*/
+ /** Untranslated short name like <tt>SLES 10</tt>*/
+ std::string shortName() const;
+
+ /** The product flavor (LiveCD Demo, FTP edition,...). */
std::string flavor() const;
- /** Get the product type (base, add-on) */
- std::string type() const ZYPP_DEPRECATED;
+ /** Get the product type (base, add-on)
+ * Well, in an ideal world there is only one base product.
+ * It's the installed product denoted by a symlink in
+ * \c /etc/products.d.
+ */
+ std::string type() const;
/** The URL to download the release notes for this product */
Url releaseNotesUrl() const;
/** The product flags */
std::list<std::string> flags() const;
- /** Untranslated short name like <tt>SLES 10</tt>*/
- std::string shortName() const;
-
- /** Translated long name like <tt>SUSE Linux Enterprise Server 10</tt>*/
- std::string longName( const Locale & lang_r = Locale() ) const ZYPP_DEPRECATED;
+ /** Translated long name like <tt>SUSE Linux Enterprise Server 10</tt>
+ * \deprecated use summary.
+ */
+ std::string longName( const Locale & lang_r = Locale() ) const ZYPP_DEPRECATED
+ { return summary( lang_r ); }
- /** Vendor specific distribution id. */
+ /** Vendor specific distribution id.
+ * \deprecated replaced by ResObject::distribution
+ */
std::string distributionName() const ZYPP_DEPRECATED;
- /** Vendor specific distribution version. */
+ /** Vendor specific distribution version.
+ * \deprecated replaced by ResObject::distribution
+ */
Edition distributionEdition() const ZYPP_DEPRECATED;
protected: