Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7558 - in /branches/use-solv/libzypp/zypp: ./ cache/ capability/ repo/cached/ solver/detail/ target/rpm/ target/store/
  • From: matz@xxxxxxxxxxxxxxxx
  • Date: Thu, 18 Oct 2007 16:21:25 -0000
  • Message-id: <20071018162126.37D5926639@xxxxxxxxxxxxxxxx>
Author: matz
Date: Thu Oct 18 18:21:25 2007
New Revision: 7558

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7558&view=rev
Log:
Work in progress to get it to compile again :)

Modified:
    branches/use-solv/libzypp/zypp/CMakeLists.txt
    branches/use-solv/libzypp/zypp/CapFactory.cc
    branches/use-solv/libzypp/zypp/Edition.cc
    branches/use-solv/libzypp/zypp/Edition.h
    branches/use-solv/libzypp/zypp/SysContent.cc
    branches/use-solv/libzypp/zypp/TODO.use-solv
    branches/use-solv/libzypp/zypp/cache/CacheStore.cc
    branches/use-solv/libzypp/zypp/cache/ResolvableQuery.cc
    branches/use-solv/libzypp/zypp/capability/CapabilityImpl.cc
    branches/use-solv/libzypp/zypp/capability/CapabilityImpl.h
    branches/use-solv/libzypp/zypp/capability/VersionedCap.cc
    branches/use-solv/libzypp/zypp/repo/cached/PackageImpl.cc
    branches/use-solv/libzypp/zypp/repo/cached/ProductImpl.cc
    branches/use-solv/libzypp/zypp/repo/cached/RepoImpl.cc
    branches/use-solv/libzypp/zypp/solver/detail/Testcase.cc
    branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc
    branches/use-solv/libzypp/zypp/target/rpm/RpmHeader.cc
    branches/use-solv/libzypp/zypp/target/store/XMLFilesBackend.cc
    branches/use-solv/libzypp/zypp/target/store/serialize.cc

Modified: branches/use-solv/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/CMakeLists.txt?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/CMakeLists.txt (original)
+++ branches/use-solv/libzypp/zypp/CMakeLists.txt Thu Oct 18 18:21:25 2007
@@ -540,16 +540,16 @@
 )
 
 SET( zypp_parser_yum_SRCS
-  parser/yum/RepoParser.cc
+  #parser/yum/RepoParser.cc
   parser/yum/FileReaderBaseImpl.cc
   parser/yum/RepomdFileReader.cc
   parser/yum/PatchesFileReader.cc
-  parser/yum/PrimaryFileReader.cc
-  parser/yum/OtherFileReader.cc
-  parser/yum/FilelistsFileReader.cc
-  parser/yum/PatchFileReader.cc
-  parser/yum/PatternFileReader.cc
-  parser/yum/ProductFileReader.cc
+  #parser/yum/PrimaryFileReader.cc
+  #parser/yum/OtherFileReader.cc
+  #parser/yum/FilelistsFileReader.cc
+  #parser/yum/PatchFileReader.cc
+  #parser/yum/PatternFileReader.cc
+  #parser/yum/ProductFileReader.cc
 )
 
 SET( zypp_parser_yum_HEADERS
@@ -1035,11 +1035,11 @@
 ${zypp_cache_SRCS}
 ${zypp_cache_sqlite3x_SRCS}
 ${zypp_pool_SRCS}
-${zypp_parser_susetags_SRCS}
+#${zypp_parser_susetags_SRCS}
 ${zypp_parser_xmlstore_SRCS}
 ${zypp_parser_xml_SRCS}
 ${zypp_parser_yum_SRCS}
-${zypp_parser_plaindir_SRCS}
+#${zypp_parser_plaindir_SRCS}
 ${zypp_parser_SRCS}
 ${zypp_data_SRCS}
 ${zypp_media_proxyinfo_SRCS}

Modified: branches/use-solv/libzypp/zypp/CapFactory.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/CapFactory.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/CapFactory.cc (original)
+++ branches/use-solv/libzypp/zypp/CapFactory.cc Thu Oct 18 18:21:25 2007
@@ -194,6 +194,7 @@
     return Capability(); // not reached
   }
 
+#if 0
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : CapFactory::parse
@@ -248,7 +249,9 @@
       ZYPP_RETHROW( excpt );
       return Capability(); // not reached
     }
+#endif
 
+#if 0
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : CapFactory::halEvalCap
@@ -296,6 +299,7 @@
     ZYPP_RETHROW( excpt );
     return Capability(); // not reached
   }
+#endif
 
   ///////////////////////////////////////////////////////////////////
   //

Modified: branches/use-solv/libzypp/zypp/Edition.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/Edition.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/Edition.cc (original)
+++ branches/use-solv/libzypp/zypp/Edition.cc Thu Oct 18 18:21:25 2007
@@ -18,12 +18,16 @@
 
 #include "zypp/Edition.h"
 
+#include "evr.h"
+
 using namespace std;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
+  extern Pool *the_pool;
+
   ///////////////////////////////////////////////////////////////////
   //
   //   hidden details
@@ -131,6 +135,7 @@
   } // namespace
   ///////////////////////////////////////////////////////////////////
 
+#if 0
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : Edition::Impl
@@ -217,6 +222,7 @@
   ///////////////////////////////////////////////////////////////////
 
   const str::regex Edition::Impl::_rxEdition( "([0-9]+:)?([^-]*)(-[^-]*)?" );
+#endif
 
   ///////////////////////////////////////////////////////////////////
 
@@ -231,91 +237,29 @@
   ///////////////////////////////////////////////////////////////////
 
   Edition::Edition()
-  : _pimpl( new Impl )
+  : id(ID_NULL)
   {}
 
-  Edition::Edition( const std::string & edition_r )
-  : _pimpl( new Impl( edition_r ) )
-  {}
-
-  Edition::Edition( const std::string & version_r,
-                    const std::string & release_r,
-                    epoch_t epoch_r )
-  : _pimpl( new Impl( version_r, release_r, epoch_r ) )
-  {}
-
-  Edition::Edition( const std::string & version_r,
-                    const std::string & release_r,
-                    const std::string & epoch_r )
-  : _pimpl( new Impl( version_r, release_r, epoch_r ) )
+  Edition::Edition( Id _id )
+  : id(_id)
   {}
 
   Edition::~Edition()
   {}
 
-  Edition::epoch_t Edition::epoch() const
-  { return _pimpl->_epoch; }
-
-  const std::string & Edition::version() const
-  { return _pimpl->_version; }
-
-  const std::string & Edition::release() const
-  { return _pimpl->_release; }
-
   std::string Edition::asString() const
   {
-    string ret;
-
-    if ( _pimpl->_epoch )
-      ret += str::form(  "%d:", _pimpl->_epoch );
-
-    ret += _pimpl->_version;
-
-    if ( ! _pimpl->_release.empty() )
-      {
-        ret += '-';
-        ret += _pimpl->_release;
-      }
-
-    if ( ret.empty() )
-      return "";
-
-    return ret;
+    return id2rel(the_pool, id);
   }
 
   int Edition::compare( const Edition & lhs, const Edition & rhs )
   {
-    // compare epoch
-    if ( lhs.epoch() != rhs.epoch() )
-      return lhs.epoch() < rhs.epoch() ? -1 : 1;
-
-    // next compare versions
-    int res = rpmverscmp( lhs.version(), rhs.version() );
-    if ( res )
-      return res; // -1|1: not equal
-
-    return rpmverscmp( lhs.release(), rhs.release() );
+    return evrcmp (the_pool, lhs.id, rhs.id);
   }
 
   int Edition::match( const Edition & lhs, const Edition & rhs )
   {
-    // compare epoch
-    if ( lhs.epoch() != rhs.epoch() )
-      return lhs.epoch() < rhs.epoch() ? -1 : 1;
-
-    // next compare versions
-    if ( lhs.version().empty() || rhs.version().empty() )
-      return 0; //equal
-
-    int res = rpmverscmp( lhs.version(), rhs.version() );
-    if ( res )
-      return res; // -1|1: not equal
-
-    // finaly compare releases
-    if ( lhs.release().empty() || rhs.release().empty() )
-      return 0; //equal
-
-    return rpmverscmp( lhs.release(), rhs.release() );
+    return evrcmp (the_pool, lhs.id, rhs.id);
   }
 
   /////////////////////////////////////////////////////////////////

Modified: branches/use-solv/libzypp/zypp/Edition.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/Edition.h?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/Edition.h (original)
+++ branches/use-solv/libzypp/zypp/Edition.h Thu Oct 18 18:21:25 2007
@@ -114,6 +114,8 @@
     */
     typedef Range<Edition> CompareRange;
 
+    Id get_id () const { return id; }
+
   public:
     /** Match two Editions returning <tt>-1,0,1</tt>, treating empty
      *  strings as \c ANY.

Modified: branches/use-solv/libzypp/zypp/SysContent.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/SysContent.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/SysContent.cc (original)
+++ branches/use-solv/libzypp/zypp/SysContent.cc Thu Oct 18 18:21:25 2007
@@ -99,9 +99,7 @@
       str << "  <ident>\n";
       str << "    <name>" << _name << "</name>\n";
       str << "    <version"
-          << attrIf( "epoch", str::numstring(_edition.epoch()) )
-          << attrIf( "ver",   _edition.version() )
-          << attrIf( "rel",   _edition.release() )
+          << attrIf( "ver",   _edition.asString() )
           << "/>\n";
       str << "    <description>" << _description << "</description>\n";
       str << "    <created>" << Date::now().asSeconds() << "</created>\n";
@@ -113,9 +111,7 @@
           str << "    <entry"
               << attrIf( "kind",  (*it)->kind().asString() )
               << attrIf( "name",  (*it)->name() )
-              << attrIf( "epoch", str::numstring((*it)->edition().epoch()) )
-              << attrIf( "ver",   (*it)->edition().version() )
-              << attrIf( "rel",   (*it)->edition().release() )
+              << attrIf( "ver",   (*it)->edition().asString() )
               << attrIf( "arch",  (*it)->arch().asString() )
               << "/>\n";
         }
@@ -303,9 +299,9 @@
 
         virtual void start( const Node & node_r )
         {
-          *_value = Edition( node_r.getAttribute("ver").asString(),
-                             node_r.getAttribute("rel").asString(),
-                             node_r.getAttribute("epoch").asString() );
+          //*_value = Edition( node_r.getAttribute("ver").asString() );
+         // XXX
+          *_value = Edition( );
         }
 
         Edition *_value;
@@ -354,9 +350,9 @@
 
           centry->_kind = node_r.getAttribute("kind").asString();
           centry->_name = node_r.getAttribute("name").asString();
-          centry->_edition = Edition( node_r.getAttribute("ver").asString(),
-                                      node_r.getAttribute("rel").asString(),
-                                      node_r.getAttribute("epoch").asString() );
+          //centry->_edition = Edition( node_r.getAttribute("ver").asString() );
+         // XXX
+          centry->_edition = Edition( );
           centry->_arch = Arch( node_r.getAttribute("arch").asString() );
 
           _value->push_back( Reader::Entry( centry ) );

Modified: branches/use-solv/libzypp/zypp/TODO.use-solv
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/TODO.use-solv?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/TODO.use-solv (original)
+++ branches/use-solv/libzypp/zypp/TODO.use-solv Thu Oct 18 18:21:25 2007
@@ -1 +1,23 @@
 Edition: cleanup several comparers.
+   maybe need an isEmpty() method (==asString().empty())?
+   Edition::match was different from Edition::compare???
+CapabilityImpl: remove this class and subclasses?
+CapFactory: rewrite (or better remove, as everything is unique already)
+VersionedCap: remove
+ResolvableQuery: remove or new interface to different structure
+CacheStore: complete overhaul, or remove
+parser/{susetags,yum}/ : remove
+cached/RepoImpl::createPatchAndDeltas : do we need this still?  Perhaps replace
+   with filter iterator over solvables?
+repo/cached/PackageImpl::sourcePkgEdition : replace with something, perhaps
+   just returning a string?
+repo/cached/ProductImpl::distributionEdition : same
+target/store/XMLFilesBackend.cc : Needs overhaul and has to insert it's
+   resolvables into the system source
+target/rpm/RpmDb::exportTrustedKeysInZyppKeyRing : look over gpg-key
+   handling, they currently use the version-release as id
+target/rpm/RpmDb::makePackageFromHeader : useless now
+target/rpm/RpmHeader::tag_edition : Fix, needs stringy interface
+target/rpm/RpmHeader::PkgRelList_val : Should not be needed.
+solver/detail/Testcase.cc : Edition handling, remove some commented out code.
+SysContent.cc : ConsumeEdition: writes out and reads in Edition as string

Modified: branches/use-solv/libzypp/zypp/cache/CacheStore.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/cache/CacheStore.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/cache/CacheStore.cc (original)
+++ branches/use-solv/libzypp/zypp/cache/CacheStore.cc Thu Oct 18 18:21:25 2007
@@ -509,9 +509,9 @@
                                   const data::RecordId &shared_id )
 {
   _pimpl->append_resolvable_cmd->bind( ":name", nvra.name );
-  _pimpl->append_resolvable_cmd->bind( ":version", nvra.edition.version() );
+  /*_pimpl->append_resolvable_cmd->bind( ":version", nvra.edition.version() );
   _pimpl->append_resolvable_cmd->bind( ":release", nvra.edition.release() );
-  _pimpl->append_resolvable_cmd->bind( ":epoch", static_cast<int>( nvra.edition.epoch() ) );
+  _pimpl->append_resolvable_cmd->bind( ":epoch", static_cast<int>( nvra.edition.epoch() ) );*/
   _pimpl->append_resolvable_cmd->bind( ":arch", lookupOrAppendType("arch", nvra.arch.asString()) );
   _pimpl->append_resolvable_cmd->bind( ":kind", lookupOrAppendType("kind", kind.asString()) );
   _pimpl->append_resolvable_cmd->bind( ":repository_id", repository_id );
@@ -605,9 +605,9 @@
 
   //_pimpl->append_named_dependency_cmd->bind( ":capability_id", capability_id);
   _pimpl->append_named_dependency_cmd->bind( ":name_id", name_id);
-  _pimpl->append_named_dependency_cmd->bind( ":version", cap->edition().version() );
+  /*_pimpl->append_named_dependency_cmd->bind( ":version", cap->edition().version() );
   _pimpl->append_named_dependency_cmd->bind( ":release", cap->edition().release() );
-  _pimpl->append_named_dependency_cmd->bind( ":epoch", static_cast<int>( cap->edition().epoch() ) );
+  _pimpl->append_named_dependency_cmd->bind( ":epoch", static_cast<int>( cap->edition().epoch() ) );*/
   _pimpl->append_named_dependency_cmd->bind( ":relation", lookupOrAppendType("rel", cap->op().asString()) );
   _pimpl->append_named_dependency_cmd->executenonquery();
 
@@ -746,9 +746,9 @@
   _pimpl->insert_patchrpm_cmd->bind(":repository_id", repository_id);
 
   _pimpl->insert_patchrpm_cmd->bind(":name",    prpm->name);
-  _pimpl->insert_patchrpm_cmd->bind(":version", prpm->edition.version());
+  /*_pimpl->insert_patchrpm_cmd->bind(":version", prpm->edition.version());
   _pimpl->insert_patchrpm_cmd->bind(":release", prpm->edition.release());
-  _pimpl->insert_patchrpm_cmd->bind(":epoch",   (int) prpm->edition.epoch());
+  _pimpl->insert_patchrpm_cmd->bind(":epoch",   (int) prpm->edition.epoch());*/
   _pimpl->insert_patchrpm_cmd->bind(":arch",    lookupOrAppendType("arch", prpm->arch.asString()));
 
   _pimpl->insert_patchrpm_cmd->bind(":media_nr", (int) prpm->location.medianr());
@@ -765,9 +765,9 @@
        bv != prpm->baseVersions.end(); ++bv)
   {
     _pimpl->append_patch_baseversion_cmd->bind(":patch_package_id", id);
-    _pimpl->append_patch_baseversion_cmd->bind(":version", (*bv)->edition.version());
+    /*_pimpl->append_patch_baseversion_cmd->bind(":version", (*bv)->edition.version());
     _pimpl->append_patch_baseversion_cmd->bind(":release", (*bv)->edition.release());
-    _pimpl->append_patch_baseversion_cmd->bind(":epoch", (int) (*bv)->edition.epoch());
+    _pimpl->append_patch_baseversion_cmd->bind(":epoch", (int) (*bv)->edition.epoch());*/
     _pimpl->append_patch_baseversion_cmd->executenonquery();
   }
 
@@ -783,9 +783,9 @@
   _pimpl->insert_deltarpm_cmd->bind(":repository_id", repository_id);
 
   _pimpl->insert_deltarpm_cmd->bind(":name",    drpm->name);
-  _pimpl->insert_deltarpm_cmd->bind(":version", drpm->edition.version());
+  /*_pimpl->insert_deltarpm_cmd->bind(":version", drpm->edition.version());
   _pimpl->insert_deltarpm_cmd->bind(":release", drpm->edition.release());
-  _pimpl->insert_deltarpm_cmd->bind(":epoch",   (int) drpm->edition.epoch());
+  _pimpl->insert_deltarpm_cmd->bind(":epoch",   (int) drpm->edition.epoch());*/
   _pimpl->insert_deltarpm_cmd->bind(":arch",    lookupOrAppendType("arch", drpm->arch.asString()));
 
   _pimpl->insert_deltarpm_cmd->bind(":media_nr", (int) drpm->location.medianr());
@@ -796,9 +796,9 @@
   _pimpl->insert_deltarpm_cmd->bind(":download_size", static_cast<ByteCount::SizeType>(drpm->location.downloadSize()));
   _pimpl->insert_deltarpm_cmd->bind(":build_time", drpm->buildTime.asSeconds());
 
-  _pimpl->insert_deltarpm_cmd->bind(":baseversion_version", drpm->baseVersion.edition.version());
+  /*_pimpl->insert_deltarpm_cmd->bind(":baseversion_version", drpm->baseVersion.edition.version());
   _pimpl->insert_deltarpm_cmd->bind(":baseversion_release", drpm->baseVersion.edition.release());
-  _pimpl->insert_deltarpm_cmd->bind(":baseversion_epoch", (int) drpm->baseVersion.edition.epoch());
+  _pimpl->insert_deltarpm_cmd->bind(":baseversion_epoch", (int) drpm->baseVersion.edition.epoch());*/
   _pimpl->insert_deltarpm_cmd->bind(":baseversion_build_time", drpm->baseVersion.buildTime.asSeconds());
   _pimpl->insert_deltarpm_cmd->bind(":baseversion_checksum", drpm->baseVersion.checkSum.checksum());
   _pimpl->insert_deltarpm_cmd->bind(":baseversion_sequence_info", drpm->baseVersion.sequenceInfo);

Modified: branches/use-solv/libzypp/zypp/cache/ResolvableQuery.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/cache/ResolvableQuery.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/cache/ResolvableQuery.cc (original)
+++ branches/use-solv/libzypp/zypp/cache/ResolvableQuery.cc Thu Oct 18 18:21:25 2007
@@ -78,7 +78,8 @@
     // see _fields definition above for the getXXX() numbers
 
     ptr->name = reader.getstring(1);
-    ptr->edition = Edition( reader.getstring(2), reader.getstring(3), reader.getint(4));
+    //ptr->edition = Edition( reader.getstring(2), reader.getstring(3), reader.getint(4));
+    ptr->edition = Edition();
     ptr->arch = _type_cache.archFor(reader.getint(5));
     ptr->kind = _type_cache.kindFor( reader.getint(6) );
     ptr->repository = reader.getint( 12 );

Modified: branches/use-solv/libzypp/zypp/capability/CapabilityImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/capability/CapabilityImpl.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/capability/CapabilityImpl.cc (original)
+++ branches/use-solv/libzypp/zypp/capability/CapabilityImpl.cc Thu Oct 18 18:21:25 2007
@@ -142,6 +142,7 @@
       return name_r.substr(0,11) == "filesystem(";
     }
 
+#if 0
     CapabilityImpl::Ptr buildFile( const Resolvable::Kind & refers_r,
                                           const std::string & name_r )
     {
@@ -391,6 +392,7 @@
       ZYPP_RETHROW( excpt );
       return NULL; // not reached
   }
+#endif
 
   ///////////////////////////////////////////////////////////////////
 

Modified: branches/use-solv/libzypp/zypp/capability/CapabilityImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/capability/CapabilityImpl.h?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/capability/CapabilityImpl.h (original)
+++ branches/use-solv/libzypp/zypp/capability/CapabilityImpl.h Thu Oct 18 18:21:25 2007
@@ -27,7 +27,6 @@
   { /////////////////////////////////////////////////////////////////
     DEFINE_PTR_TYPE(CapabilityImpl)
 
-
     ///////////////////////////////////////////////////////////////////
     //
     // CLASS NAME : CapabilityImpl
@@ -201,8 +200,8 @@
      * The final Capability must be created by CapFactory, as it
      * is a friend of Capability. Here we can't access the ctor.
      */
-    CapabilityImpl::Ptr buildFile( const Resolvable::Kind & refers_r,
-                                  const std::string & name_r );
+    /*CapabilityImpl::Ptr buildFile( const Resolvable::Kind & refers_r,
+                                  const std::string & name_r );*/
 
     /** Try to build a non versioned cap from \a name_r .
      *
@@ -210,8 +209,8 @@
      * The final Capability must be created by CapFactory, as it
      * is a friend of Capability. Here we can't access the ctor.
     */
-    CapabilityImpl::Ptr buildNamed( const Resolvable::Kind & refers_r,
-                                   const std::string & name_r );
+    /*CapabilityImpl::Ptr buildNamed( const Resolvable::Kind & refers_r,
+                                   const std::string & name_r );*/
 
     /** Try to build a versioned cap from \a name_r .
      *
@@ -221,10 +220,10 @@
      *
      * \todo Quick check for name not being filename or split.
     */
-    CapabilityImpl::Ptr buildVersioned( const Resolvable::Kind & refers_r,
+    /*CapabilityImpl::Ptr buildVersioned( const Resolvable::Kind & refers_r,
                                        const std::string & name_r,
                                        Rel op_r,
-                                       const Edition & edition_r );
+                                       const Edition & edition_r );*/
 
     /** Try to build a hal cap from \a name_r .
      *
@@ -234,10 +233,10 @@
      *
      * \todo Fix incaccuracy.
     */
-    CapabilityImpl::Ptr buildHal( const Resolvable::Kind & refers_r,
+    /*CapabilityImpl::Ptr buildHal( const Resolvable::Kind & refers_r,
                                  const std::string & name_r,
                                  Rel op_r = Rel::ANY,
-                                 const std::string & value_r = std::string() );
+                                 const std::string & value_r = std::string() );*/
 
     /** Try to build a modalias cap from \a name_r .
      *
@@ -247,10 +246,10 @@
      *
      * \todo Fix incaccuracy.
     */
-    CapabilityImpl::Ptr buildModalias( const Resolvable::Kind & refers_r,
+    /*CapabilityImpl::Ptr buildModalias( const Resolvable::Kind & refers_r,
                                       const std::string & name_r,
                                       Rel op_r = Rel::ANY,
-                                      const std::string & value_r = std::string() );
+                                      const std::string & value_r = std::string() );*/
 
     /** Try to build a filesystem cap from \a name_r .
      *
@@ -260,12 +259,14 @@
      *
      * \todo Fix incaccuracy.
     */
-    CapabilityImpl::Ptr buildFilesystem( const Resolvable::Kind & refers_r,
-                                        const std::string & name_r );
+    /*CapabilityImpl::Ptr buildFilesystem( const Resolvable::Kind & refers_r,
+                                        const std::string & name_r );*/
+
+    CapabilityImpl::Ptr buildCap (Id id);
 
     ///////////////////////////////////////////////////////////////////
 
-    CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
+    /*CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
                               const std::string & strval_r );
 
     CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
@@ -276,7 +277,7 @@
     CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
                               const std::string & name_r,
                               Rel op_r,
-                              const Edition & edition_r );
+                              const Edition & edition_r );*/
 
     /** Test whether a CapabilityImpl is of a certain Kind.
      * \code

Modified: branches/use-solv/libzypp/zypp/capability/VersionedCap.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/capability/VersionedCap.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/capability/VersionedCap.cc (original)
+++ branches/use-solv/libzypp/zypp/capability/VersionedCap.cc Thu Oct 18 18:21:25 2007
@@ -57,15 +57,16 @@
         return false;
       const Edition &ed1 = _range.value;
       const Edition &ed2 = other.value;
-      return (ed1.epoch() == ed2.epoch()
+      /*return (ed1.epoch() == ed2.epoch()
              && ed1.version() == ed2.version()
-             && ed1.release() == ed2.release());
+             && ed1.release() == ed2.release());*/
+      return ed1.get_id() == ed2.get_id();
     }
 
     size_t VersionedCap::hash() const
     {
       size_t ret = __gnu_cxx::hash<const char*>()( name().c_str() );
-      ret ^= __gnu_cxx::hash<const char*>()( _range.value.version().c_str() );
+      //ret ^= __gnu_cxx::hash<const char*>()( _range.value.version().c_str() );
       return ret;
     }
 

Modified: branches/use-solv/libzypp/zypp/repo/cached/PackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/repo/cached/PackageImpl.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/repo/cached/PackageImpl.cc (original)
+++ branches/use-solv/libzypp/zypp/repo/cached/PackageImpl.cc Thu Oct 18 18:21:25 2007
@@ -234,7 +234,9 @@
 
 Edition PackageImpl::sourcePkgEdition() const
 {
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgEdition() );
+  //return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgEdition() );
+// MMM
+  return Edition();
 }
 
 /////////////////////////////////////////////////////////////////

Modified: branches/use-solv/libzypp/zypp/repo/cached/ProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/repo/cached/ProductImpl.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/repo/cached/ProductImpl.cc (original)
+++ branches/use-solv/libzypp/zypp/repo/cached/ProductImpl.cc Thu Oct 18 18:21:25 2007
@@ -150,7 +150,9 @@
 
 Edition ProductImpl::distributionEdition() const
 {
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductDistributionEdition() );
+  //return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductDistributionEdition() );
+// XXX
+  return Edition();
 }
 
 /////////////////////////////////////////////////////////////////

Modified: branches/use-solv/libzypp/zypp/repo/cached/RepoImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/repo/cached/RepoImpl.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/repo/cached/RepoImpl.cc (original)
+++ branches/use-solv/libzypp/zypp/repo/cached/RepoImpl.cc Thu Oct 18 18:21:25 2007
@@ -231,7 +231,7 @@
              else
                {
                  /* ??? catch exception here? */
-                 ed = Edition (id2str (pool, rd->evr));
+                 ed = Edition (rd->evr);
                  id2ed[rd->evr] = ed;
                }
               capi = new capability::VersionedCap( refer, name, rel, ed );
@@ -270,7 +270,7 @@
         {
          /* ??? catch exception here? */
          /* XXX Edition ctor does a regexp if given a string :( */
-         ed = Edition (id2str (pool, s->evr));
+         ed = Edition (s->evr);
          id2ed[s->evr] = ed;
         }
       NVRAD nvrad ( name,
@@ -308,109 +308,12 @@
     createResFromSource();
     return;
   }
-
-  CapFactory capfactory;
-  try
-  {
-    sqlite3_connection con((_options.dbdir + "zypp.db").asString().c_str());
-    con.setprogresshandler(subprogrcv, 100);
-
-    con.executenonquery("PRAGMA cache_size=8000;");
-    con.executenonquery("BEGIN;");
-
-//     We could use this to calculate total resolvables
-//     sqlite3_command total_cmd("select count(id) from resolvables where repository_id=:repository_id;");
-//     total_cmd.bind(":repository_id", _repository_id);
-//     int total = total_cmd.executeint();
-
-    sqlite3_command cmd( con, "select id,name,version,release,epoch,arch,kind from resolvables where repository_id=:repository_id;");
-    cmd.bind(":repository_id", _options.repository_id);
-    map<data::RecordId, pair<Resolvable::Kind, NVRAD> > nvras;
-
-    sqlite3_reader reader = cmd.executereader();
-
-    while(reader.read())
-    {
-      long long id = reader.getint64(0);
-      Dependencies deps;
-      Resolvable::Kind kind = _type_cache.kindFor(reader.getint(6));
-      // Collect basic Resolvable data
-      nvras[id] = make_pair( kind, NVRAD( reader.getstring(1),
-                                          Edition( reader.getstring(2), reader.getstring(3), reader.getint(4) ),
-                                          _type_cache.archFor(reader.getint(5)),
-                                           deps ) );
-    }
-
-    MIL << "Done reading resolvables nvra" << endl;
-
-    ticks.tick();
-
-    read_capabilities( con, _options.repository_id, nvras, ticks );
-
-    ticks.tick();
-
-    for ( map<data::RecordId, pair<Resolvable::Kind, NVRAD> >::const_iterator it = nvras.begin(); it != nvras.end(); ++it )
-    {
-      if ( it->second.first == ResTraits<Package>::kind )
-      {
-        ResImplTraits<cached::PackageImpl>::Ptr impl = new cached::PackageImpl(it->first, this);
-        Package::Ptr package = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( package );
-      }
-      else if ( it->second.first == ResTraits<SrcPackage>::kind )
-      {
-        ResImplTraits<cached::SrcPackageImpl>::Ptr impl = new cached::SrcPackageImpl(it->first, this);
-        SrcPackage::Ptr srcpackage = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( srcpackage );
-      }
-      else if ( it->second.first == ResTraits<Product>::kind )
-      {
-        ResImplTraits<cached::ProductImpl>::Ptr impl = new cached::ProductImpl(it->first, this);
-        Product::Ptr product = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( product );
-      }
-      else if ( it->second.first == ResTraits<Pattern>::kind )
-      {
-        ResImplTraits<cached::PatternImpl>::Ptr impl = new cached::PatternImpl(it->first, this);
-        Pattern::Ptr pattern = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( pattern );
-      }
-      else if ( it->second.first == ResTraits<Patch>::kind )
-      {
-        ResImplTraits<cached::PatchImpl>::Ptr impl = new cached::PatchImpl(it->first, this);
-        Patch::Ptr patch = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( patch );
-      }
-      else if ( it->second.first == ResTraits<Message>::kind )
-      {
-        ResImplTraits<cached::MessageImpl>::Ptr impl = new cached::MessageImpl(it->first, this);
-        Message::Ptr message = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( message );
-      }
-      else if ( it->second.first == ResTraits<Script>::kind )
-      {
-        ResImplTraits<cached::ScriptImpl>::Ptr impl = new cached::ScriptImpl(it->first, this);
-        Script::Ptr script = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( script );
-      }
-      else if ( it->second.first == ResTraits<Atom>::kind )
-      {
-        ResImplTraits<cached::AtomImpl>::Ptr impl = new cached::AtomImpl(it->first, this);
-        Atom::Ptr atom = detail::makeResolvableFromImpl( it->second.second, impl );
-        _store.insert( atom );
-      }
-    }
-    con.executenonquery("COMMIT;");
-    con.resetprogresshandler();
-  }
-  catch(exception &ex) {
-      cerr << "Exception Occured: " << ex.what() << endl;
-   }
-  //extract_packages_from_directory( _store, thePath, selfRepositoryRef(), true );
+  cerr << "AIEEEH, no SOLV source" << endl;
 }
 
 void RepoImpl::createPatchAndDeltas()
 {
+#if 0
   ProgressData ticks;
   ticks.sendTo(_options.readingPatchDeltasProgress );
   ticks.name(str::form(_( "Reading patch and delta rpms from '%s' repository cache"), info().alias().c_str()));
@@ -539,6 +442,7 @@
   catch(exception &ex) {
       cerr << "Exception Occured: " << ex.what() << endl;
   }
+#endif
 }
 
 ResolvableQuery RepoImpl::resolvableQuery()
@@ -551,220 +455,6 @@
                                   map<data::RecordId, pair<Resolvable::Kind, NVRAD> > &nvras,
                                   ProgressData &ticks )
 {
-  CapFactory capfactory;
-
-
-  // precompile statements
-
-
-
-//   map<data::RecordId, capability::CapabilityImpl::Ptr> named_caps;
-//   sqlite3_command select_named_cmd( con, "select v.id, c.refers_kind, n.name, v.version, v.release, v.epoch, v.relation named_capabilities v, capabilities c, names n where v.name_id=n.id and c.id=ncc.capability_id and ncc.named_capability_id=v.id;");
-//   {
-//     debug::Measure mnc("read named capabilities");
-//     sqlite3_reader reader = select_named_cmd.executereader();
-//     while  ( reader.read() )
-//     {
-//
-//     }
-//   }
-  sqlite3_command select_named_cmd( con, "select v.refers_kind, v.name_id, v.version, v.release, v.epoch, v.relation, v.dependency_type, v.resolvable_id from named_capabilities v, resolvables res where res.repository_id=:repo_id and v.resolvable_id=res.id;");
-
-  sqlite3_command select_file_cmd( con, "select fc.refers_kind, dn.name, fn.name, fc.dependency_type, fc.resolvable_id from file_capabilities fc, files f, dir_names dn, file_names fn, resolvables res where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and fc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_hal_cmd( con, "select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc, resolvables res where hc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_modalias_cmd( con, "select mc.refers_kind, mc.name, mc.pkgname, mc.value, mc.relation, mc.dependency_type, mc.resolvable_id from modalias_capabilities mc, resolvables res where mc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_filesystem_cmd( con, "select v.refers_kind, n.name, v.dependency_type, v.resolvable_id from filesystem_capabilities v, names n, resolvables res where v.name_id=n.id and v.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_split_cmd( con, "select v.refers_kind, n.name, dn.name, fn.name, v.dependency_type, v.resolvable_id from split_capabilities v, names n, resolvables res, files f, dir_names dn, file_names fn where v.name_id=n.id and v.resolvable_id=res.id and f.id=v.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_other_cmd( con, "select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc, resolvables res where oc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-
-  std::map<int,std::string> namemap;
-  sqlite3_command get_names_cmd( con, "select id,name from names;" );
-  {
-    sqlite3_reader reader = get_names_cmd.executereader();
-    while  ( reader.read() )
-    {
-      namemap[reader.getint(0)] = reader.getstring(1);
-    }
-  }
-
-  {
-    debug::Measure mnc("read named capabilities");
-    select_named_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_named_cmd.executereader();
-
-    // FIXME Move this logic to tick()?
-    Date start(Date::now());
-    Capability oldcap;
-    Resolvable::Kind oldrefer;
-    Rel oldrel;
-    //std::string oldname;
-    int oldname = -1;
-    std::string oldver, oldrelease;
-    int oldepoch = 0;
-
-
-    while  ( reader.read() )
-    {
-      ticks.tick();
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      int name = reader.getint(1);
-      Rel rel = _type_cache.relationFor(reader.getint(5));
-
-      if ( rel == zypp::Rel::NONE )
-      {
-        if (oldname != name || rel != oldrel || refer!=oldrefer)
-       {
-         oldrel = rel;
-         oldrefer = refer;
-         oldname = name;
-          capability::NamedCap *ncap = new capability::NamedCap( refer, namemap[name] );
-         oldcap = capfactory.fromImpl ( capability::CapabilityImpl::Ptr(ncap) );
-       }
-      }
-      else
-      {
-       std::string ver = reader.getstring(2);
-       std::string release = reader.getstring(3);
-       int epoch = reader.getint(4);
-        if (oldname != name || rel != oldrel || refer!=oldrefer
-           || oldver != ver
-           || oldrelease != release
-           || oldepoch != epoch)
-       {
-         oldrel = rel;
-         oldrefer = refer;
-         oldname = name;
-         oldver = ver;
-         oldrelease = release;
-         oldepoch = epoch;
-
-          capability::VersionedCap *vcap = new capability::VersionedCap( refer, namemap[name], /* rel */ rel, Edition( ver, release, epoch ) );
-         oldcap = capfactory.fromImpl( capability::CapabilityImpl::Ptr(vcap) );
-       }
-      }
-
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(6));
-      data::RecordId rid = reader.getint64(7);
-      nvras[rid].second[deptype].insert(oldcap);
-    }
-  }
-
-  {
-    debug::Measure mnf("read file capabilities");
-    select_file_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_file_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      capability::FileCap *fcap = new capability::FileCap( refer, reader.getstring(1) + "/" + reader.getstring(2) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(3));
-      data::RecordId rid = reader.getint64(4);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read hal capabilities");
-    select_hal_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_hal_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      //select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      Rel rel = _type_cache.relationFor(reader.getint(3));
-      capability::HalCap *hcap = new capability::HalCap( refer, reader.getstring(1), rel, reader.getstring(2) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
-      data::RecordId rid = reader.getint64(5);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(hcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read modalias capabilities");
-    select_modalias_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_modalias_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      Rel rel = _type_cache.relationFor(reader.getint(4));
-      capability::ModaliasCap *mcap = new capability::ModaliasCap( refer, reader.getstring(1), rel, reader.getstring(3) );
-      mcap->setPkgname(reader.getstring(2));
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(5));
-      data::RecordId rid = reader.getint64(6);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(mcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read filesystem capabilities");
-    select_filesystem_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_filesystem_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      capability::FilesystemCap *fscap = new capability::FilesystemCap( refer, reader.getstring(1) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
-      data::RecordId rid = reader.getint64(3);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fscap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read split capabilities");
-    select_split_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_split_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      capability::SplitCap *scap = new capability::SplitCap( refer, reader.getstring(1),
-                                                             reader.getstring(2) + "/" + reader.getstring(3) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
-      data::RecordId rid = reader.getint64(5);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(scap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read other capabilities");
-    select_other_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_other_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      //select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc;
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      capability::CapabilityImpl::Ptr cap = capability::parse( refer, reader.getstring(1));
-
-      if ( !cap )
-      {
-        ERR << "Invalid capability " <<  reader.getstring(1) << endl;
-      }
-
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
-      data::RecordId rid = reader.getint64(3);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl(cap) );
-    }
-  }
-
-  MIL << nvras.size() << " capabilities" << endl;
 }
 
 

Modified: branches/use-solv/libzypp/zypp/solver/detail/Testcase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/solver/detail/Testcase.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ branches/use-solv/libzypp/zypp/solver/detail/Testcase.cc Thu Oct 18 18:21:25 2007
@@ -74,11 +74,12 @@
 std::string helixXML( const Edition &edition )
 {
     stringstream str;
-    str << xml_tag_enclose(edition.version(), "version");
+    /*str << xml_tag_enclose(edition.version(), "version");
     if (!edition.release().empty())
        str << xml_tag_enclose(edition.release(), "release");
     if (edition.epoch() != Edition::noepoch)
-       str << xml_tag_enclose(numstring(edition.epoch()), "epoch");    
+       str << xml_tag_enclose(numstring(edition.epoch()), "epoch");    */
+    str << xml_tag_enclose(edition.asString(), "version");
     return str.str();
 }
 
@@ -98,15 +99,15 @@
     if (vercap
        && vercap->op() != Rel::NONE
        && vercap->op() != Rel::ANY
-       && !vercap->edition().version().empty() )
+       && !vercap->edition().asString().empty() )
     {
        // version capability
        str << "<dep name='" << xml_escape(vercap->index()) << "' op='" << xml_escape(vercap->op().asString()) <<
-           "' version='" << vercap->edition().version() << "'";
-       if (!vercap->edition().release().empty())
+           "' version='" << vercap->edition().asString() << "'";
+       /*if (!vercap->edition().release().empty())
            str << " release='" << vercap->edition().release() << "'";
        if (vercap->edition().epoch() != Edition::noepoch)
-           str << " epoch='" << numstring(vercap->edition().epoch()) << "'";
+           str << " epoch='" << numstring(vercap->edition().epoch()) << "'";*/
     }
     else
     {
@@ -403,7 +404,7 @@
     Repository repo  = resObject->repository();
     *file << "<install channel=\"" << numstring(repo.numericId()) << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
          << " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
-         << " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\"" 
+         << " version=\"" << resObject->edition().asString() << "\""
          << "/>" << endl;
 }
 
@@ -412,7 +413,7 @@
     Repository repo  = resObject->repository();
     *file << "<lock channel=\"" << numstring(repo.numericId()) << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
          << " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
-         << " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\"" 
+         << " version=\"" << resObject->edition().asString() << "\""
          << "/>" << endl;
 }
 
@@ -421,7 +422,7 @@
     Repository repo  = resObject->repository();
     *file << "<keep channel=\"" << numstring(repo.numericId()) << "\" kind=\"" << toLower (resObject->kind().asString()) << "\""
          << " name=\"" << resObject->name() << "\"" << " arch=\"" << resObject->arch().asString() << "\""
-         << " version=\"" << resObject->edition().version() << "\"" << " release=\"" << resObject->edition().release() << "\"" 
+         << " version=\"" << resObject->edition().asString() << "\""
          << "/>" << endl;
 }
     

Modified: branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc (original)
+++ branches/use-solv/libzypp/zypp/target/rpm/RpmDb.cc Thu Oct 18 18:21:25 2007
@@ -940,7 +940,7 @@
   {
     // search the zypp key into the rpm keys
     // long id is edition version + release
-    string id = str::toUpper( (*it).version() + (*it).release());
+    string id = str::toUpper( (*it).asString());
     list<PublicKey>::iterator ik = find( zypp_keys.begin(), zypp_keys.end(), id);
     if ( ik != zypp_keys.end() )
     {
@@ -998,7 +998,7 @@
   set<Edition> rpm_keys = pubkeyEditions();
   for ( set<Edition>::const_iterator it = rpm_keys.begin(); it != rpm_keys.end(); ++it)
   {
-    string id = str::toUpper( (*it).version() );
+    string id = str::toUpper( (*it).asString().substr(0,8) );
     string keyshortid = pubkey_r.id().substr(8,8);
     MIL << "Comparing '" << id << "' to '" << keyshortid << "'" << endl;
     if ( id == keyshortid )
@@ -1164,6 +1164,9 @@
                                            set<string> * filerequires,
                                            const Pathname & location, Repository repo )
 {
+#if 1
+  return 0;
+#else
   if ( ! header )
     return 0;
 
@@ -1259,6 +1262,7 @@
   }
 
   return pptr;
+#endif
 }
 
 static bool
@@ -1365,7 +1369,7 @@
              else
                {
                  /* ??? catch exception here? */
-                 ed = Edition (id2str (pool, rd->evr));
+                 ed = Edition (rd->evr);
                  id2ed[rd->evr] = ed;
                }
               capi = new capability::VersionedCap( refer, name, rel, ed );
@@ -1417,7 +1421,7 @@
                {
                  /* ??? catch exception here? */
                  /* XXX Edition ctor does a regexp if given a string :( */
-                 ed = Edition (id2str (the_pool, s->evr));
+                 ed = Edition (s->evr);
                  id2ed[s->evr] = ed;
                }
              NVRAD nvrad ( name,

Modified: branches/use-solv/libzypp/zypp/target/rpm/RpmHeader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/target/rpm/RpmHeader.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/target/rpm/RpmHeader.cc (original)
+++ branches/use-solv/libzypp/zypp/target/rpm/RpmHeader.cc Thu Oct 18 18:21:25 2007
@@ -217,7 +217,9 @@
 {
   try
   {
-    return Edition( tag_version(), tag_release(), tag_epoch());
+    //return Edition( tag_version(), tag_release(), tag_epoch());
+    // XXX
+    return Edition( );
   }
   catch (Exception & excpt_r)
   {
@@ -278,6 +280,7 @@
   {
     CapabilityImplPtrSet ret;
 
+#if 0
     int_32  kindFlags   = 0;
     int_32  kindVersion = 0;
 
@@ -390,6 +393,9 @@
         }
       }
     }
+#else
+    cerr << "AIEEE! called RpmHeader::PkgRelList_val" << endl;
+#endif
 
     return ret;
   }

Modified: branches/use-solv/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ branches/use-solv/libzypp/zypp/target/store/XMLFilesBackend.cc Thu Oct 18 18:21:25 2007
@@ -794,7 +794,10 @@
 
     // Collect basic Resolvable data
     NVRAD dataCollect( parsed.name,
-                       Edition( parsed.ver, parsed.rel, parsed.epoch ), arch,
+                       //Edition( parsed.ver, parsed.rel, parsed.epoch ),
+                      // XXX
+                       Edition( ),
+                      arch,
                        createDependencies(parsed, ResTraits<Patch>::kind) );
     Patch::Ptr patch = detail::makeResolvableFromImpl( dataCollect, impl );
     CapFactory _f;
@@ -866,7 +869,9 @@
       arch = Arch(parsed.arch);
 
     // Collect basic Resolvable data
-    NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Atom>::kind) );
+    //NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Atom>::kind) );
+    // XXX
+    NVRAD dataCollect( parsed.name, Edition( ), arch, createDependencies(parsed, ResTraits<Atom>::kind) );
 
     impl->_summary = parsed.summary;
     impl->_description = parsed.summary;
@@ -920,7 +925,9 @@
     impl->_install_time = parsed.install_time;
 
     // Collect basic Resolvable data
-    NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Message>::kind) );
+    //NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Message>::kind) );
+    // XXX
+    NVRAD dataCollect( parsed.name, Edition( ), arch, createDependencies(parsed, ResTraits<Message>::kind) );
     Message::Ptr message = detail::makeResolvableFromImpl( dataCollect, impl);
     return message;
   }
@@ -962,7 +969,9 @@
     impl->_install_time = parsed.install_time;
 
     // Collect basic Resolvable data
-    NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Script>::kind));
+    //NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies(parsed, ResTraits<Script>::kind));
+    // XXX
+    NVRAD dataCollect( parsed.name, Edition( ), arch, createDependencies(parsed, ResTraits<Script>::kind));
     Script::Ptr script = detail::makeResolvableFromImpl( dataCollect, impl );
     return script;
   }
@@ -1006,7 +1015,9 @@
   {
     detail::ResImplTraits<XMLProductImpl>::Ptr impl(new XMLProductImpl());
 
-    Edition parser_edition = ( parsed.parser_version.empty() ? Edition::noedition : Edition(parsed.parser_version) );
+    //Edition parser_edition = ( parsed.parser_version.empty() ? Edition::noedition : Edition(parsed.parser_version) );
+    // XXX
+    Edition parser_edition = ( parsed.parser_version.empty() ? Edition::noedition : Edition() );
 
     impl->_summary = parsed.summary;
     impl->_description = parsed.summary;
@@ -1024,7 +1035,9 @@
     impl->_type = parsed.type;
     impl->_short_name = parsed.short_name;
     impl->_dist_name = parsed.dist_name;
-    impl->_dist_version = parsed.dist_version;
+    //impl->_dist_version = parsed.dist_version;
+    // XXX _dist_version is Edition, parsed.dist_version is string
+    impl->_dist_version = Edition();
 
     if ( parsed.releasenotesurl.size() > 0 )
       impl->_release_notes_url = parsed.releasenotesurl;
@@ -1091,21 +1104,23 @@
     if (!parsed.arch.empty())
       arch = Arch(parsed.arch);
 
-    Edition prod_edition( parsed.ver, parsed.rel, parsed.epoch );
+    //Edition prod_edition( parsed.ver, parsed.rel, parsed.epoch );
+    // XXX
+    Edition prod_edition;
     string prod_name(parsed.name);
     // check for product name to see if it was written with distname
     // as name as part of https://bugzilla.novell.com/show_bug.cgi?id=205392
     bool save_new_product_again_workaround = false;
     if ( parser_edition == Edition::noedition )
     {
-      MIL << "Product " << parsed.name << " " << prod_edition << " possibly suffers from bug #205392. checking..." << endl;
+      MIL << "Product " << parsed.name << " " << prod_edition.asString() << " possibly suffers from bug #205392. checking..." << endl;
       PRODUCT_TABLE_ENTRY *all_products = products_table();
       while ( all_products->dist_name != 0L )
       {
         //MIL << "Checking " << parsed.name << " " << prod_edition << " with " << all_products->dist_name << " " << all_products->dist_version << endl;
         if ( ( parsed.name == all_products->dist_name ) && ( prod_edition.asString() == all_products->dist_version ) )
         {
-          MIL << "[ATTENTION] Detected bug #205392. Product " << parsed.name << " " << prod_edition << " will be changed to " << all_products->product_name << " " << all_products->product_version << std::endl;
+          MIL << "[ATTENTION] Detected bug #205392. Product " << parsed.name << " " << prod_edition.asString() << " will be changed to " << all_products->product_name << " " << all_products->product_version << std::endl;
 
           // save pathname of the old wrong product
           Pathname wrong_product = Pathname(dirForResolvableKind(ResTraits<zypp::Product>::kind)) + fileNameForNVR( NVR( parsed.name, prod_edition) );
@@ -1113,11 +1128,15 @@
           // ok, potentially this is a wrong product, well, IT IS!
           // overwrte those here as they are used in dataCollect
           prod_name = string(all_products->product_name);
-          prod_edition = Edition(all_products->product_version);
+          //prod_edition = Edition(all_products->product_version);
+         // XXX
+          prod_edition = Edition();
 
           // those were already set, so reset them.
           impl->_dist_name = all_products->dist_name;
-          impl->_dist_version = Edition(all_products->dist_version);
+          //impl->_dist_version = Edition(all_products->dist_version);
+         // XXX
+          impl->_dist_version = Edition();
 
           // ok, now mark for save this product and delete the old one
           deleteFileObject( wrong_product );
@@ -1193,7 +1212,9 @@
     }
 
     // Collect basic Resolvable data
-    NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
+    //NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
+    // XXX
+    NVRAD dataCollect( parsed.name, Edition( ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
     Pattern::Ptr pattern = detail::makeResolvableFromImpl( dataCollect, impl );
     return pattern;
   }
@@ -1237,7 +1258,9 @@
       arch = Arch(parsed.arch);
 
     // Collect basic Resolvable data
-    NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
+    //NVRAD dataCollect( parsed.name, Edition( parsed.ver, parsed.rel, parsed.epoch ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
+    // XXX
+    NVRAD dataCollect( parsed.name, Edition( ), arch, createDependencies( parsed, ResTraits<Pattern>::kind));
     Selection::Ptr selection = detail::makeResolvableFromImpl( dataCollect, impl );
     return selection;
   }

Modified: branches/use-solv/libzypp/zypp/target/store/serialize.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/target/store/serialize.cc?rev=7558&r1=7557&r2=7558&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/target/store/serialize.cc (original)
+++ branches/use-solv/libzypp/zypp/target/store/serialize.cc Thu Oct 18 18:21:25 2007
@@ -110,7 +110,9 @@
 {
   stringstream out;
   // sad the yum guys did not acll it edition
-  out << "<version ver=\"" << xml_escape(edition.version()) << "\" rel=\"" << xml_escape(edition.release()) << "\" epoch=\"" << edition.epoch() << "\" />";
+  //out << "<version ver=\"" << xml_escape(edition.version()) << "\" rel=\"" << xml_escape(edition.release()) << "\" epoch=\"" << edition.epoch() << "\" />";
+  // XXX
+  out << "<version ver=\"" << xml_escape(edition.asString()) << "\" />";
   return out.str();
 }
 

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages