Mailinglist Archive: zypp-commit (149 mails)

< Previous Next >
[zypp-commit] r5393 - in /trunk/libzypp: devel/devel.dmacvicar/ zypp/source/yum/ zypp/target/store/ zypp2/cache/ zypp2/cache/schema/ zypp2/cache/sqlite_detail/
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Mon, 16 Apr 2007 17:21:00 -0000
  • Message-id: <20070416172100.4141E23712@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Mon Apr 16 19:20:59 2007
New Revision: 5393

URL: http://svn.opensuse.org/viewcvs/zypp?rev=5393&view=rev
Log:

adding catalog support to the store, disabling normalization
of resolvables, they perform horrible.
Cached source can create simple resolvables!


Added:
    trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
    trunk/libzypp/zypp/source/yum/YUMDownloader.cc
      - copied unchanged from r5383, trunk/libzypp/devel/devel.dmacvicar/YUMDownloader.cc
    trunk/libzypp/zypp/source/yum/YUMDownloader.h
      - copied unchanged from r5383, trunk/libzypp/devel/devel.dmacvicar/YUMDownloader.h
Modified:
    trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt
    trunk/libzypp/devel/devel.dmacvicar/SUSETagsParser_tp.cc
    trunk/libzypp/zypp/target/store/XMLFilesBackend.cc
    trunk/libzypp/zypp/target/store/XMLFilesBackend.h
    trunk/libzypp/zypp2/cache/CacheStore.cpp
    trunk/libzypp/zypp2/cache/CacheStore.h
    trunk/libzypp/zypp2/cache/CapabilityQuery.cc
    trunk/libzypp/zypp2/cache/CapabilityQuery.h
    trunk/libzypp/zypp2/cache/schema/schema.sql
    trunk/libzypp/zypp2/cache/sqlite_detail/CapabilityQueryImpl.cc
    trunk/libzypp/zypp2/cache/sqlite_detail/QueryFactoryImpl.cc

Modified: trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt (original)
+++ trunk/libzypp/devel/devel.dmacvicar/CMakeLists.txt Mon Apr 16 19:20:59 2007
@@ -32,6 +32,10 @@
 TARGET_LINK_LIBRARIES(yum-downloader  zypp )
 TARGET_LINK_LIBRARIES(yum-downloader  zypp2 )
 
+ADD_EXECUTABLE(cachedsource CachedSource_tp.cc)
+TARGET_LINK_LIBRARIES(cachedsource  zypp )
+TARGET_LINK_LIBRARIES(cachedsource  zypp2 )
+
 FIND_PACKAGE(Zsync)
 IF(ZSYNC_FOUND)
   ADD_EXECUTABLE(zsync zsync.cc)

Added: trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc?rev=5393&view=auto
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc (added)
+++ trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc Mon Apr 16 19:20:59 2007
@@ -0,0 +1,49 @@
+#include <sys/time.h>
+
+#include <iostream>
+#include <fstream>
+
+#include <zypp/base/Logger.h>
+#include <zypp/ZYpp.h>
+#include <zypp/ZYppFactory.h>
+
+#include "zypp/Product.h"
+#include "zypp/detail/PackageImplIf.h"
+#include "zypp/Package.h"
+#include "zypp/SourceFactory.h"
+#include "zypp2/source/cached/CachedSourceImpl.h"
+#include "zypp/data/ResolvableData.h"
+
+using namespace std;
+using namespace zypp;
+using namespace zypp::source;
+using namespace zypp::source::cached;
+
+
+int main(int argc, char **argv)
+{
+    try
+    {
+      ZYpp::Ptr z = getZYpp();
+    
+      Pathname dbpath = Pathname(getenv("PWD"));
+      
+      SourceImpl_Ptr sourceImpl(new CachedSourceImpl(dbpath));
+      SourceFactory factory;
+      Source_Ref source = factory.createFrom(sourceImpl);
+      ResStore dbres = source.resolvables();
+      
+      MIL << dbres.size() << " resolvables" << endl;
+
+    }
+    catch ( const Exception &e )
+    {
+      ZYPP_CAUGHT(e);
+      cout << e.msg() << endl;
+    }
+    
+    return 0;
+}
+
+
+

Modified: trunk/libzypp/devel/devel.dmacvicar/SUSETagsParser_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/SUSETagsParser_tp.cc?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/SUSETagsParser_tp.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/SUSETagsParser_tp.cc Mon Apr 16 19:20:59 2007
@@ -18,7 +18,7 @@
       ZYpp::Ptr z = getZYpp();
       Pathname dbfile = Pathname(getenv("PWD")) + "data.db";
       zypp::cache::CacheStore store(getenv("PWD"));
-      data::RecordId catalog_id = store.lookupOrAppendCatalog( Url(argv[1]), "/");
+      data::RecordId catalog_id = store.lookupOrAppendCatalog( Url("http://www.google.com";), "/");
       PackagesParser parser( catalog_id, store);
       Measure m;
       parser.start(argv[1]);

Modified: trunk/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ trunk/libzypp/zypp/target/store/XMLFilesBackend.cc Mon Apr 16 19:20:59 2007
@@ -13,10 +13,10 @@
 #include <ctime>
 #include <cstdlib>
 #include <cstdio>
-#include <fcntl.h>
 
 #include "zypp/base/Logger.h"
 #include "zypp/base/Exception.h"
+#include "zypp/base/Random.h"
 
 #include "zypp/CapFactory.h"
 #include "zypp/Digest.h"
@@ -220,46 +220,6 @@
   }
 }
 
-// Taken from KApplication
-int XMLFilesBackend::random() const
-{
-   static bool init = false;
-   if (!init)
-   {
-      unsigned int seed;
-      init = true;
-      int fd = open("/dev/urandom", O_RDONLY);
-      if (fd < 0 || ::read(fd, &seed, sizeof(seed)) != sizeof(seed))
-      {
-            // No /dev/urandom... try something else.
-            srand(getpid());
-            seed = rand()+time(0);
-      }
-      if (fd >= 0) close(fd);
-      srand(seed);
-   }
-   return rand();
-}
-
-// Taken from KApplication
-std::string XMLFilesBackend::randomString(int length) const
-{
-   if (length <=0 ) return std::string();
-
-   std::string str; str.resize( length );
-   int i = 0;
-   while (length--)
-   {
-      int r=random() % 62;
-      r+=48;
-      if (r>57) r+=7;
-      if (r>90) r+=6;
-      str[i++] =  char(r);
-      // so what if I work backwards?
-   }
-   return str;
-}
-
 bool
 XMLFilesBackend::isBackendInitialized() const
 {

Modified: trunk/libzypp/zypp/target/store/XMLFilesBackend.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/store/XMLFilesBackend.h?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp/target/store/XMLFilesBackend.h (original)
+++ trunk/libzypp/zypp/target/store/XMLFilesBackend.h Mon Apr 16 19:20:59 2007
@@ -135,9 +135,7 @@
   
 
   protected:
-  std::string randomString(int length) const;
-  int random() const;
-
+  
   /**
    * delete a path in the database, only used by deleteObject
    * and workarounds

Modified: trunk/libzypp/zypp2/cache/CacheStore.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CacheStore.cpp?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/CacheStore.cpp (original)
+++ trunk/libzypp/zypp2/cache/CacheStore.cpp Mon Apr 16 19:20:59 2007
@@ -33,6 +33,10 @@
   {}
 
   sqlite3_connection con;
+  
+  sqlite3_command_ptr update_catalog_cmd;
+  sqlite3_command_ptr insert_resolvable_in_catalog_cmd;
+  
   sqlite3_command_ptr select_name_cmd;
   sqlite3_command_ptr insert_name_cmd;
   
@@ -42,6 +46,9 @@
   sqlite3_command_ptr select_filename_cmd;
   sqlite3_command_ptr insert_filename_cmd;
   
+  sqlite3_command_ptr select_catalog_cmd;
+  sqlite3_command_ptr insert_catalog_cmd;
+  
   sqlite3_command_ptr select_file_cmd;
   sqlite3_command_ptr insert_file_cmd;
   
@@ -75,6 +82,13 @@
     ZYPP_THROW(Exception(ex.what()));
   }
   
+  _pimpl->insert_resolvable_in_catalog_cmd.reset( new sqlite3_command( _pimpl->con, "insert into resolvables_catalogs (resolvable_id, catalog_id) values (:resolvable_id, :catalog_id);" ));
+  
+  _pimpl->update_catalog_cmd.reset( new sqlite3_command( _pimpl->con, "update catalogs set checksum=:checksum, timestamp=:timestamp where id=:catalog_id;" ));
+  
+  _pimpl->select_catalog_cmd.reset( new sqlite3_command( _pimpl->con, "select id from catalogs where url=:url and path=:path;" ));
+  _pimpl->insert_catalog_cmd.reset( new sqlite3_command( _pimpl->con, "insert into catalogs (url,path,timestamp) values (:url,:path,:timestamp);" ));
+  
   _pimpl->select_name_cmd.reset( new sqlite3_command( _pimpl->con, "select id from names where name=:name;" ));
   _pimpl->insert_name_cmd.reset( new sqlite3_command( _pimpl->con, "insert into names (name) values (:name);" ));
   
@@ -89,9 +103,9 @@
 
   _pimpl->insert_dependency_entry_cmd.reset( new sqlite3_command( _pimpl->con, "insert into capabilities ( resolvable_id, dependency_type, refers_kind ) values ( :resolvable_id, :dependency_type, :refers_kind );" ));
   _pimpl->append_file_dependency_cmd.reset( new sqlite3_command( _pimpl->con, "insert into file_capabilities ( dependency_id, file_id ) values ( :dependency_id, :file_id );" ));
-  _pimpl->append_versioned_dependency_cmd.reset( new sqlite3_command( _pimpl->con, "insert into versioned_capabilities ( dependency_id, name_id, version, release, epoch, relation ) values ( :dependency_id, :name_id, :version, :release, :epoch, :relation );" ));
+  _pimpl->append_versioned_dependency_cmd.reset( new sqlite3_command( _pimpl->con, "insert into named_capabilities ( dependency_id, name_id, version, release, epoch, relation ) values ( :dependency_id, :name_id, :version, :release, :epoch, :relation );" ));
   
-  _pimpl->append_resolvable_cmd.reset( new sqlite3_command( _pimpl->con, "insert into resolvables ( name, version, release, epoch, arch, kind ) values ( :name, :version, :release, :epoch, :arch, :kind );" ));
+  _pimpl->append_resolvable_cmd.reset( new sqlite3_command( _pimpl->con, "insert into resolvables ( name, version, release, epoch, arch, kind, catalog_id ) values ( :name, :version, :release, :epoch, :arch, :kind, :catalog_id );" ));
   
   // disable autocommit
   _pimpl->con.executenonquery("BEGIN;");
@@ -109,10 +123,13 @@
 
 void CacheStore::consumePackage( const data::Package &package )
 {
-  data::RecordId pkgid = appendResolvable( ResTraits<Package>::kind, NVRA( package.name, package.edition, package.arch ), package.deps );
+  //data::RecordId pkgid = appendResolvable( ResTraits<Package>::kind, NVRA( package.name, package.edition, package.arch ), package.deps );
 }
 
-data::RecordId CacheStore::appendResolvable( const Resolvable::Kind &kind, const NVRA &nvra, const data::Dependencies &deps )
+data::RecordId CacheStore::appendResolvable( const data::RecordId &catalog_id,
+                                             const Resolvable::Kind &kind, 
+                                             const NVRA &nvra, 
+                                             const data::Dependencies &deps )
 {
   _pimpl->append_resolvable_cmd->bind( ":name", nvra.name );
   _pimpl->append_resolvable_cmd->bind( ":version", nvra.edition.version() );
@@ -120,12 +137,17 @@
   _pimpl->append_resolvable_cmd->bind( ":epoch", static_cast<int>( nvra.edition.epoch() ) );
   _pimpl->append_resolvable_cmd->bind( ":arch", zypp_arch2db_arch(nvra.arch) );
   _pimpl->append_resolvable_cmd->bind( ":kind", zypp_kind2db_kind(kind) );
+  _pimpl->append_resolvable_cmd->bind( ":catalog_id", catalog_id );
   
   _pimpl->append_resolvable_cmd->executenonquery();
 
   long long id = _pimpl->con.insertid();
   
   appendDependencies( id, deps );
+  /*
+  _pimpl->insert_resolvable_in_catalog_cmd->bind(":catalog_id", catalog_id);
+  _pimpl->insert_resolvable_in_catalog_cmd->bind(":resolvable_id", id);
+  _pimpl->insert_resolvable_in_catalog_cmd->executenonquery();*/
   
   return static_cast<data::RecordId>(id);
   return 1;
@@ -253,6 +275,39 @@
   return static_cast<data::RecordId>(id);
 }
 
+void CacheStore::updateCatalog( const data::RecordId &id, 
+                    const std::string &checksum, 
+                    const Date &timestamp )
+{
+  _pimpl->update_catalog_cmd->bind(":catalog_id", id);
+  _pimpl->update_catalog_cmd->bind(":checksum", checksum);
+  _pimpl->update_catalog_cmd->bind(":timestamp", static_cast<int>((Date::ValueType) timestamp) );
+  _pimpl->insert_catalog_cmd->executenonquery();
+}
+
+data::RecordId CacheStore::lookupOrAppendCatalog( const Url &url, const Pathname &path )
+{
+  _pimpl->select_catalog_cmd->bind(":url", url.asString());
+  _pimpl->select_catalog_cmd->bind(":path", path.asString());
+  
+  long long id = 0;
+  try {
+    id = _pimpl->select_catalog_cmd->executeint64();
+  }
+  catch ( const sqlite3x::database_error &e )
+  {
+    // does not exist
+    _pimpl->insert_catalog_cmd->bind(":url", url.asString());
+    _pimpl->insert_catalog_cmd->bind(":path", path.asString());
+    _pimpl->insert_catalog_cmd->bind(":timestamp", static_cast<int>((Date::ValueType) Date::now()) );
+    _pimpl->insert_catalog_cmd->executenonquery();
+    id = _pimpl->con.insertid();
+    return static_cast<data::RecordId>(id);
+    
+  }
+  return static_cast<data::RecordId>(id);
+}
+
 data::RecordId CacheStore::lookupOrAppendName( const std::string &name )
 {
   _pimpl->select_name_cmd->bind(":name", name);

Modified: trunk/libzypp/zypp2/cache/CacheStore.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CacheStore.h?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/CacheStore.h (original)
+++ trunk/libzypp/zypp2/cache/CacheStore.h Mon Apr 16 19:20:59 2007
@@ -17,7 +17,7 @@
 #include "zypp/base/NonCopyable.h"
 #include "zypp/base/PtrTypes.h"
 #include "zypp/Pathname.h"
-
+#include "zypp/NVRA.h"
 #include "zypp/capability/CapabilityImpl.h"
 #include "zypp/capability/Capabilities.h"
 
@@ -69,6 +69,10 @@
        * Optionaly you can pass a list of \c CapabilityImpl::Ptr
        * as dependencies for the resolvable.
        * 
+       * You have to specify the RecordId for the catalog owning
+       * this resolvable. Yuu can obtain it with
+       * \ref lookupOrAppendCatalog
+       * 
        * You can create those \a deps using \ref capability::parse
        * functions, or the build methods to create specific types
        * of capabilities:
@@ -81,7 +85,8 @@
        * other properties.
        *
        */
-      data::RecordId appendResolvable( const Resolvable::Kind &kind,
+      data::RecordId appendResolvable( const data::RecordId &catalog_id,
+                                       const Resolvable::Kind &kind,
                                        const NVRA &nvra,
                                        const data::Dependencies &deps );
       
@@ -132,23 +137,6 @@
                              capability::CapabilityImpl::Ptr cap );
       
       /**
-       * Adds a versioned dependency to the store.
-       *
-       * A \ref VersionedCap::Ptr \a dlist to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       * 
-       * \a resolvable_id is the resolvable Id in the CacheStore
-       * that will own the capability
-       *
-       * You can create the versioned capability using either
-       * \ref capability::parse or \ref capability::buildVersioned
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      //void appendVersionedDependency( const data::RecordId &, zypp::Dep, capability::VersionedCap::Ptr);
-      
-      /**
        * Adds a Named dependency to the store.
        *
        * A \ref NamedCap::Ptr \a dlist to be specified. Among
@@ -163,7 +151,8 @@
        *
        * FIXME should it \throw if the resolvable does not exist?
        */
-      void appendNamedDependency( const data::RecordId &, zypp::Dep, capability::NamedCap::Ptr);
+      void appendNamedDependency( const data::RecordId &, zypp::Dep,
+                                  capability::NamedCap::Ptr);
       
       /**
        * Adds a file dependency to the store.
@@ -180,7 +169,32 @@
        *
        * FIXME should it \throw if the resolvable does not exist?
        */
-      void appendFileDependency( const data::RecordId &, zypp::Dep, capability::FileCap::Ptr);
+      void appendFileDependency( const data::RecordId &, zypp::Dep, 
+                                 capability::FileCap::Ptr);
+      
+      /**
+       * Returns the record id of a catalog (Source) \a path
+       *
+       * \note If the catalog entry does not exist, it will
+       * be created and the new inserted entry's id will
+       * be returned.
+       */
+      data::RecordId lookupOrAppendCatalog( const Url &url, 
+                                            const Pathname &path );
+      
+       /**
+       * Update a known catalog checksum and timestamp
+       *
+       * \note If you don't provide timestamp it defaults
+       * to now.
+       *
+       * It is responsability of the caller to operate with
+       * a valid record id. You can get one
+       * Using \ref lookupOrAppendCatalog
+       */
+      void updateCatalog( const data::RecordId &id, 
+                                    const std::string &checksum, 
+                                    const Date &timestamp = Date::now() );
       
       /**
        * Returns the record id of a file entry \a path
@@ -224,7 +238,8 @@
        * the capabilities table for a specific capability
        * entry.
        */
-      data::RecordId appendDependencyEntry( const data::RecordId &, zypp::Dep, const Resolvable::Kind & );
+      data::RecordId appendDependencyEntry( const data::RecordId &, 
+                                            zypp::Dep, const Resolvable::Kind & );
     private:
       /** Implementation. */
       class Impl;

Modified: trunk/libzypp/zypp2/cache/CapabilityQuery.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CapabilityQuery.cc?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/CapabilityQuery.cc (original)
+++ trunk/libzypp/zypp2/cache/CapabilityQuery.cc Mon Apr 16 19:20:59 2007
@@ -40,9 +40,9 @@
     _pimpl->context->select_filecap_cmd->bind(":rid", _pimpl->_resolvable_id);
     _pimpl->_file_reader.reset( new sqlite3_reader(_pimpl->context->select_filecap_cmd->executereader()));
     
-    MIL << "Done setup query" << endl;
+    //MIL << "Done setup query" << endl;
     read();
-    MIL << "Done first read" << endl;
+    //MIL << "Done first read" << endl;
 }
 
 CapabilityQuery::~CapabilityQuery()

Modified: trunk/libzypp/zypp2/cache/CapabilityQuery.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CapabilityQuery.h?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/CapabilityQuery.h (original)
+++ trunk/libzypp/zypp2/cache/CapabilityQuery.h Mon Apr 16 19:20:59 2007
@@ -54,6 +54,12 @@
     struct CapabilityQuery
     {
     public:
+      class Result
+      {
+        data::RecordId id;
+        zypp::Dep dep;
+        capability::CapabilityImpl::Ptr cap;
+      };
      /**
       * reads the next item for the query
       * returns false if there are no

Modified: trunk/libzypp/zypp2/cache/schema/schema.sql
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/schema/schema.sql?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/schema/schema.sql (original)
+++ trunk/libzypp/zypp2/cache/schema/schema.sql Mon Apr 16 19:20:59 2007
@@ -12,7 +12,7 @@
 DROP VIEW IF EXISTS messages;
 DROP TRIGGER IF EXISTS remove_resolvables;
 DROP TRIGGER IF EXISTS remove_patch_packages_baseversions;
-DROP TABLE IF EXISTS versioned_capabilities;
+DROP TABLE IF EXISTS named_capabilities;
 DROP TABLE IF EXISTS translated_texts;
 DROP TABLE IF EXISTS script_details;
 DROP TABLE IF EXISTS resolvable_texts;
@@ -38,7 +38,7 @@
 DROP TABLE IF EXISTS capabilities;
 DROP INDEX IF EXISTS package_details_resolvable_id;
 DROP INDEX IF EXISTS capability_resolvable;
-DROP INDEX IF EXISTS versioned_capabilities_dependency_id;
+DROP INDEX IF EXISTS named_capabilities_dependency_id;
 
 ------------------------------------------------
 -- version metadata, probably not needed, there
@@ -57,7 +57,8 @@
     id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
   , url TEXT NOT NULL
   , path TEXT NOT NULL
-
+  , checksum TEXT DEFAULT NULL
+  , timestamp INTEGER NOT NULL
 );
 
 ------------------------------------------------
@@ -132,6 +133,7 @@
   , install_only INTEGER
   , build_time INTEGER
   , install_time INTEGER
+  , catalog_id INTEGER REFERENCES catalogs(id)
 );
 
 CREATE TABLE message_details (
@@ -315,7 +317,7 @@
 );
 CREATE INDEX capability_resolvable ON capabilities (resolvable_id);
 
-CREATE TABLE versioned_capabilities (
+CREATE TABLE named_capabilities (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL 
   , dependency_id INTEGER REFERENCES capabilities (id)
   , name_id INTEGER REFERENCES names(id)
@@ -324,7 +326,7 @@
   , epoch INTEGER
   , relation INTEGER
 );
-CREATE INDEX versioned_capabilities_dependency_id ON versioned_capabilities (dependency_id);
+CREATE INDEX named_capabilities_dependency_id ON named_capabilities (dependency_id);
 
 CREATE TABLE file_capabilities (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL 

Modified: trunk/libzypp/zypp2/cache/sqlite_detail/CapabilityQueryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/sqlite_detail/CapabilityQueryImpl.cc?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/sqlite_detail/CapabilityQueryImpl.cc (original)
+++ trunk/libzypp/zypp2/cache/sqlite_detail/CapabilityQueryImpl.cc Mon Apr 16 19:20:59 2007
@@ -34,7 +34,7 @@
 
 CapabilityQuery::Impl::~Impl()
 {
-  MIL << endl;
+  //MIL << endl;
 }
 
 

Modified: trunk/libzypp/zypp2/cache/sqlite_detail/QueryFactoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/sqlite_detail/QueryFactoryImpl.cc?rev=5393&r1=5392&r2=5393&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/sqlite_detail/QueryFactoryImpl.cc (original)
+++ trunk/libzypp/zypp2/cache/sqlite_detail/QueryFactoryImpl.cc Mon Apr 16 19:20:59 2007
@@ -69,7 +69,7 @@
   try
   {
     // precompile statements
-    context->select_versionedcap_cmd.reset( new sqlite3_command( *context->con, "select c.refers_kind, n.name, v.version, v.release, v.epoch, v.relation, c.dependency_type from names n, capabilities c, versioned_capabilities v where v.name_id=n.id and c.id=v.dependency_id and c.resolvable_id=:rid;"));
+    context->select_versionedcap_cmd.reset( new sqlite3_command( *context->con, "select c.refers_kind, n.name, v.version, v.release, v.epoch, v.relation, c.dependency_type from names n, capabilities c, named_capabilities v where v.name_id=n.id and c.id=v.dependency_id and c.resolvable_id=:rid;"));
     context->select_namedcap_cmd.reset( new sqlite3_command( *context->con, "select c.refers_kind, n.name, c.dependency_type from names n, capabilities c, named_capabilities nc where nc.name_id=n.id and c.id=nc.dependency_id and c.resolvable_id=:rid;"));
     context->select_filecap_cmd.reset( new sqlite3_command( *context->con, "select c.refers_kind, dn.name, fn.name, c.dependency_type from file_names fn, dir_names dn, capabilities c, file_capabilities fc, files f  where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and c.id=fc.dependency_id and c.resolvable_id=:rid;"));
     

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

< Previous Next >
This Thread
  • No further messages