- Make registerTarget and registerRelease abvailable for installed
authorMichael Andres <ma@suse.de>
Fri, 12 Sep 2008 14:07:45 +0000 (14:07 +0000)
committerMichael Andres <ma@suse.de>
Fri, 12 Sep 2008 14:07:45 +0000 (14:07 +0000)
  product. Required for registration.

package/libzypp.changes
zypp/Product.cc
zypp/Product.h
zypp/sat/SolvAttr.cc
zypp/sat/SolvAttr.h

index cf3044e5f4ad2e19a8e0dab3a2756c71ece63314..ac9212ec5c3a65fcf20ec614bcc5c34c7035d08c 100644 (file)
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Fri Sep 12 16:04:54 CEST 2008 - ma@suse.de
+
+- Make registerTarget and registerRelease abvailable for installed 
+  product. Required for registration.
+- revision 11043
+
 -------------------------------------------------------------------
 Fri Sep 12 12:59:50 CEST 2008 - ma@suse.de
 
index 966b38f334a352197aa62225f7b1839b85bed559..f3fc8126ad2c7cad9f083fc42b2c27efbf1f3385 100644 (file)
@@ -151,6 +151,12 @@ namespace zypp
     return ret;
   }
 
+  std::string Product::registerTarget() const
+  { return lookupStrAttribute( sat::SolvAttr::productRegisterTarget );}
+
+  std::string Product::registerRelease() const
+  { return lookupStrAttribute( sat::SolvAttr::productRegisterRelease ); }
+
   /////////////////////////////////////////////////////////////////
 
   Product::UrlList Product::urls( const std::string & key_r ) const
index c921cf199a5b9a89bbd1f8937d53a47b4698d385..ac259ba9bf56181a63de2c71d458fdb2612089ac 100644 (file)
@@ -76,6 +76,17 @@ namespace zypp
     /** The product flags */
     std::list<std::string> flags() const;
 
+    /** This is \c register.target attribute of an installed product.
+     * Used for registration.
+    */
+    std::string registerTarget() const;
+
+    /** This is \c register.release attribute of an installed product.
+     * Used for registration.
+     */
+    std::string registerRelease() const;
+
+
   public:
     /***/
     class UrlList;
index ab43046bfe26a4a9358268e764f6a13cbcae06bc..e0d4511e0fc244fd135328d62de438c6102a7957 100644 (file)
@@ -97,14 +97,16 @@ namespace sat
   const SolvAttr SolvAttr::extends      ( SOLVABLE_EXTENDS );
 
   // product
-  const SolvAttr SolvAttr::productShortlabel   ( PRODUCT_SHORTLABEL );
-  const SolvAttr SolvAttr::productDistproduct  ( PRODUCT_DISTPRODUCT );
-  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::productReferences   ( PRODUCT_REFERENCES );
-  const SolvAttr SolvAttr::productUpdaterepoKey( PRODUCT_UPDATEREPOKEY );
+  const SolvAttr SolvAttr::productShortlabel     ( PRODUCT_SHORTLABEL );
+  const SolvAttr SolvAttr::productDistproduct    ( PRODUCT_DISTPRODUCT );
+  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::productReferences     ( PRODUCT_REFERENCES );
+  const SolvAttr SolvAttr::productUpdaterepoKey  ( PRODUCT_UPDATEREPOKEY );
+  const SolvAttr SolvAttr::productRegisterTarget ( "" )
+  const SolvAttr SolvAttr::productRegisterRelease( "" )
 
   const SolvAttr SolvAttr::productUrl( PRODUCT_URL );
   const SolvAttr SolvAttr::productUrlType( PRODUCT_URL_TYPE );
index c8ea67295cc6417cd4dcb2ab4f2317c0d46d5bda..7c3ad1170ec53484c9dd4c4cb7a7c75028794cc4 100644 (file)
@@ -130,10 +130,10 @@ namespace sat
       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;
       static const SolvAttr productUrl;
       static const SolvAttr productUrlType;
-
       //@}
 
       /** \name repository */