Provide product::updaterepoKey: Update repository indicator string.
authorMichael Andres <ma@suse.de>
Wed, 10 Sep 2008 14:41:54 +0000 (14:41 +0000)
committerMichael Andres <ma@suse.de>
Wed, 10 Sep 2008 14:41:54 +0000 (14:41 +0000)
VERSION.cmake
devel/devel.ma/NewPool.cc
package/libzypp.changes
zypp/Product.cc
zypp/Product.h
zypp/sat/SolvAttr.cc
zypp/sat/SolvAttr.h

index c05ba1d..3099822 100644 (file)
@@ -60,7 +60,7 @@
 #
 SET(LIBZYPP_MAJOR "5")
 SET(LIBZYPP_COMPATMINOR "8")
-SET(LIBZYPP_MINOR "8")
+SET(LIBZYPP_MINOR "9")
 SET(LIBZYPP_PATCH "0")
 #
 # LAST RELEASED: 5.8.0 (8)
index d64f093..e41f7d1 100644 (file)
@@ -443,20 +443,19 @@ try {
   INT << "===[START]==========================================" << endl;
   ZConfig::instance();
 
+#if 0
   ServiceInfo s( "STest", Url("dir:///somewhere") );
   DBG << s << endl;
   s.addCatalogToEnable( "foo" );
   s.addCatalogToEnable( "ba a" );
   s.addCatalogToEnable( "kaa" );
   DBG << s << endl;
-  s.delCatalogToEnable( "kaa" );
-  DBG << s << endl;
 
   ///////////////////////////////////////////////////////////////////
   INT << "===[END]============================================" << endl << endl;
   zypp::base::LogControl::instance().logNothing();
   return 0;
-
+#endif
 
   ResPool   pool( ResPool::instance() );
   sat::Pool satpool( sat::Pool::instance() );
@@ -474,7 +473,7 @@ try {
     }
   }
 
-  if ( 1 )
+  if ( 0 )
   {
     RepoManager repoManager( makeRepoManager( sysRoot ) );
     RepoInfoList repos = repoManager.knownRepositories();
index d689ddb..0ed29ca 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Sep 10 16:40:00 CEST 2008 - ma@suse.de
+
+- Provide product::updaterepoKey: Update repository indicator string.
+- revision 11000
+
+-------------------------------------------------------------------
 Tue Sep  9 17:33:03 CEST 2008 - dmacvicar@suse.de
 
 - provide context about the repository (name/alias) if available when
index e7e98ed..24d9ea4 100644 (file)
@@ -88,13 +88,14 @@ namespace zypp
       return sat::Solvable::noSolvable;
     }
 
-
     // if there is productReferences defined, we expect
-    // a matching package within the same repo.
+    // a matching package within the same repo. And of
+    // same arch.
     sat::WhatProvides providers( identCap );
     for_( it, providers.begin(), providers.end() )
     {
-      if ( it->repository() == repository() )
+      if ( it->repository() == repository()
+           && it->arch() == arch() )
         return *it;
     }
 
@@ -140,6 +141,9 @@ namespace zypp
   std::string Product::type() const
   { return lookupStrAttribute( sat::SolvAttr::productType ); }
 
+  std::string Product::updaterepoKey() const
+  { return lookupStrAttribute( sat::SolvAttr::productUpdaterepoKey ); }
+
   Url Product::releaseNotesUrl() const
   {
     std::list<Url> ret;
index fd2a65f..746bb13 100644 (file)
@@ -66,6 +66,13 @@ namespace zypp
     */
     std::string type() const;
 
+    /** Update repository indicator string.
+     * Repositories providing updates/patches for this product
+     * should (somehow) provide this string. So we are able to
+     * detect them.
+     */
+    std::string updaterepoKey() const;
+
     /** The URL to download the release notes for this product */
     Url releaseNotesUrl() const;
 
@@ -91,6 +98,7 @@ namespace zypp
     /** The product flags */
     std::list<std::string> flags() const;
 
+
     /** Translated long name like <tt>SUSE Linux Enterprise Server 10</tt>
      * \deprecated use summary.
      */
index 188ecf4..a25ef1b 100644 (file)
@@ -97,7 +97,6 @@ namespace sat
   const SolvAttr SolvAttr::extends      ( SOLVABLE_EXTENDS );
 
   // product
-  const SolvAttr SolvAttr::productReferences   ( PRODUCT_REFERENCES );
   const SolvAttr SolvAttr::productShortlabel   ( PRODUCT_SHORTLABEL );
   const SolvAttr SolvAttr::productDistproduct  ( PRODUCT_DISTPRODUCT );
   const SolvAttr SolvAttr::productDistversion  ( PRODUCT_DISTVERSION );
@@ -108,6 +107,8 @@ namespace sat
   const SolvAttr SolvAttr::productOptionalurls ( PRODUCT_OPTIONALURLS );
   const SolvAttr SolvAttr::productFlags        ( PRODUCT_FLAGS );
   const SolvAttr SolvAttr::productFlavor       ( PRODUCT_FLAVOR );
+  const SolvAttr SolvAttr::productReferences   ( PRODUCT_REFERENCES );
+  const SolvAttr SolvAttr::productUpdaterepoKey( PRODUCT_UPDATEREPOKEY );
 
   // repository
   const SolvAttr SolvAttr::repositoryTimestamp ( REPOSITORY_TIMESTAMP );
index d0ffaa2..6e1dbdf 100644 (file)
@@ -122,7 +122,6 @@ namespace sat
 
       /** \name product */
       //@{
-      static const SolvAttr productReferences; // the package providing the metadata
       static const SolvAttr productShortlabel;
       static const SolvAttr productDistproduct;
       static const SolvAttr productDistversion;
@@ -133,6 +132,8 @@ namespace sat
       static const SolvAttr productOptionalurls;
       static const SolvAttr productFlags;
       static const SolvAttr productFlavor;
+      static const SolvAttr productReferences; // the package providing the metadata
+      static const SolvAttr productUpdaterepoKey;
       //@}
 
       /** \name repository */