Remove superfluous PRODUCT_REFERENCES attribute.
authorMichael Andres <ma@suse.de>
Mon, 22 Sep 2008 14:29:15 +0000 (14:29 +0000)
committerMichael Andres <ma@suse.de>
Mon, 22 Sep 2008 14:29:15 +0000 (14:29 +0000)
package/libzypp.changes
zypp/Product.cc
zypp/sat/SolvAttr.cc
zypp/sat/SolvAttr.h

index d5701aad1311e65a2b1170809d5a5d8614f1d6ed..cc933930bf2e8af7bd8d2699e845c5852155fe86 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon Sep 22 16:27:41 CEST 2008 - ma@suse.de
+
+- Remove superfluous PRODUCT_REFERENCES attribute.
+- revision 11127
+
 -------------------------------------------------------------------
 Mon Sep 22 16:13:08 CEST 2008 - ma@suse.de
 
index 44f92d9f6878d0689f863920df3b2272e5cc97a8..24ab43ba124238847473c3bc11001401ef0ddbb7 100644 (file)
@@ -75,22 +75,10 @@ namespace zypp
 
   sat::Solvable Product::referencePackage() const
   {
-    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;
-    }
+    // Look for a  provider of 'product(name) = version' of same
+    // architecture and within the same repo.
+    Capability identCap( str::form( "product(%s) = %s", name().c_str(), edition().c_str() ) );
 
-    // if there is productReferences defined, we expect
-    // a matching package within the same repo. And of
-    // same arch.
     sat::WhatProvides providers( identCap );
     for_( it, providers.begin(), providers.end() )
     {
index 67d38c5fdf32637a1c2780644b7c113061580f9a..2772729b2d9bfd4014fc7b1648f63fa6c0d24ddf 100644 (file)
@@ -103,7 +103,6 @@ namespace sat
   const SolvAttr SolvAttr::productType           ( PRODUCT_TYPE );
   const SolvAttr SolvAttr::productFlags          ( PRODUCT_FLAGS );
   const SolvAttr SolvAttr::productFlavor         ( PRODUCT_FLAVOR );
-  const SolvAttr SolvAttr::productReferences     ( PRODUCT_REFERENCES );
   const SolvAttr SolvAttr::productUpdaterepoKey  ( PRODUCT_UPDATEREPOKEY );
   const SolvAttr SolvAttr::productRegisterTarget ( PRODUCT_REGISTER_TARGET );
   const SolvAttr SolvAttr::productRegisterRelease( PRODUCT_REGISTER_RELEASE );
index 4dc6940f4ad0a7a6e8562701e5b7b3ac31d5ae98..4dd5d5288e87ab6a394889001d13701cb33182c0 100644 (file)
@@ -128,7 +128,6 @@ namespace sat
       static const SolvAttr productType;
       static const SolvAttr productFlags;
       static const SolvAttr productFlavor;
-      static const SolvAttr productReferences; // the package providing the metadata
       static const SolvAttr productUpdaterepoKey;
       static const SolvAttr productRegisterTarget;
       static const SolvAttr productRegisterRelease;