Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit libzypp
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Tue, 28 Aug 2007 18:18:08 +0200
  • Message-id: <20070828161808.EE4B1678182@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libzypp
checked in at Tue Aug 28 18:18:08 CEST 2007.

--------
--- libzypp/libzypp.changes     2007-08-27 17:51:39.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes        2007-08-28 18:16:35.071796000 +0200
@@ -1,0 +2,30 @@
+Tue Aug 28 17:30:30 CEST 2007 - kkaempf@xxxxxxx
+
+- rename ResolvableQuery::iterateResolvablesByKindsAndStrings
+  to ResolvableQuery::iterateResolvablesByKindsAndStringsAndRepos
+  in order to support query-by-repo (#305384)
+- fix iterateResolvablesByKindsAndStringsAndRepos to take any
+  number of kinds, names, or repos (#305347)
+- remove ResolvableQuery::iterateResolvablesByKind, not needed
+- version 3.19.0
+- rev 6935
+
+-------------------------------------------------------------------
+Tue Aug 28 11:27:53 CEST 2007 - dmacvicar@xxxxxxx
+
+- real fix for reading signature ids. (#390535).  
+- delete metadata when removing repo (#301037).
+
+-------------------------------------------------------------------
+Mon Aug 27 23:52:41 CEST 2007 - dmacvicar@xxxxxxx
+
+- following behaviour for setPartitions
+  - if they are not set, they are detected
+  - if they are set, that value is used.
+  - if value set or detected is empty, all disk usage
+    information is read. Otherwise just values in those
+    mount points.
+    Should work for installation as long as detectPartitions
+    is empty at installation.(#293039)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-3.18.4.tar.bz2

New:
----
  libzypp-3.19.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.P28541/_old  2007-08-28 18:16:50.000000000 +0200
+++ /var/tmp/diff_new_pack.P28541/_new  2007-08-28 18:16:50.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package libzypp (Version 3.18.4)
+# spec file for package libzypp (Version 3.19.0)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -16,9 +16,9 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Autoreqprov:    on
 Summary:        Package, Patch, Pattern, and Product Management
-Version:        3.18.4
-Release:        5
-Source:         libzypp-3.18.4.tar.bz2
+Version:        3.19.0
+Release:        1
+Source:         libzypp-3.19.0.tar.bz2
 Source1:        libzypp-rpmlintrc
 Prefix:         /usr
 Provides:       yast2-packagemanager
@@ -44,7 +44,7 @@
     Ladislav Slezak <lslezak@xxxxxxx>
 
 %package devel
-Requires:       libzypp == 3.18.4
+Requires:       libzypp == 3.19.0
 Requires:       libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
 Requires:       bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
 Requires:       cmake
@@ -125,6 +125,27 @@
 %{_libdir}/pkgconfig/libzypp.pc
 
 %changelog
+* Tue Aug 28 2007 - kkaempf@xxxxxxx
+- rename ResolvableQuery::iterateResolvablesByKindsAndStrings
+  to ResolvableQuery::iterateResolvablesByKindsAndStringsAndRepos
+  in order to support query-by-repo (#305384)
+- fix iterateResolvablesByKindsAndStringsAndRepos to take any
+  number of kinds, names, or repos (#305347)
+- remove ResolvableQuery::iterateResolvablesByKind, not needed
+- version 3.19.0
+- rev 6935
+* Tue Aug 28 2007 - dmacvicar@xxxxxxx
+- real fix for reading signature ids. (#390535).
+- delete metadata when removing repo (#301037).
+* Mon Aug 27 2007 - dmacvicar@xxxxxxx
+- following behaviour for setPartitions
+  - if they are not set, they are detected
+  - if they are set, that value is used.
+  - if value set or detected is empty, all disk usage
+  information is read. Otherwise just values in those
+  mount points.
+  Should work for installation as long as detectPartitions
+  is empty at installation.(#293039)
 * Mon Aug 27 2007 - kkaempf@xxxxxxx
 - Add ZConfig::overrideSystemArchitecture() to override zypp arch
   from external, e.g. for the testcases

++++++ libzypp-3.18.4.tar.bz2 -> libzypp-3.19.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/package/libzypp.changes new/libzypp-3.19.0/package/libzypp.changes
--- old/libzypp-3.18.4/package/libzypp.changes  2007-08-27 17:47:46.000000000 +0200
+++ new/libzypp-3.19.0/package/libzypp.changes  2007-08-28 18:00:20.000000000 +0200
@@ -1,4 +1,34 @@
 -------------------------------------------------------------------
+Tue Aug 28 17:30:30 CEST 2007 - kkaempf@xxxxxxx
+
+- rename ResolvableQuery::iterateResolvablesByKindsAndStrings
+  to ResolvableQuery::iterateResolvablesByKindsAndStringsAndRepos
+  in order to support query-by-repo (#305384)
+- fix iterateResolvablesByKindsAndStringsAndRepos to take any
+  number of kinds, names, or repos (#305347)
+- remove ResolvableQuery::iterateResolvablesByKind, not needed
+- version 3.19.0
+- rev 6935
+
+-------------------------------------------------------------------
+Tue Aug 28 11:27:53 CEST 2007 - duncan@xxxxxxx
+
+- real fix for reading signature ids. (#390535).  
+- delete metadata when removing repo (#301037).
+
+-------------------------------------------------------------------
+Mon Aug 27 23:52:41 CEST 2007 - dmacvicar@xxxxxxx
+
+- following behaviour for setPartitions
+  - if they are not set, they are detected
+  - if they are set, that value is used.
+  - if value set or detected is empty, all disk usage
+    information is read. Otherwise just values in those
+    mount points.
+    Should work for installation as long as detectPartitions
+    is empty at installation.(#293039)
+
+-------------------------------------------------------------------
 Mon Aug 27 17:08:41 CEST 2007 - kkaempf@xxxxxxx
 
 - Add ZConfig::overrideSystemArchitecture() to override zypp arch
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/cache/CacheStore_test.cc new/libzypp-3.19.0/tests/cache/CacheStore_test.cc
--- old/libzypp-3.18.4/tests/cache/CacheStore_test.cc   2007-08-27 17:47:46.000000000 +0200
+++ new/libzypp-3.19.0/tests/cache/CacheStore_test.cc   2007-08-28 18:00:20.000000000 +0200
@@ -71,7 +71,13 @@
   BOOST_CHECK_EQUAL( p->size(), 38850584);
   BOOST_CHECK_EQUAL( p->location().downloadSize(), 16356019);
   
-  BOOST_CHECK_EQUAL( p->diskusage().size(), (unsigned)3);
+  BOOST_CHECK_EQUAL( p->diskusage().size(), (unsigned) 181);
+  for ( DiskUsage::iterator it = p->diskusage().begin();
+        it !=  p->diskusage().end();
+        ++it )
+  {
+    MIL << "disk usage entry " << (*it).path << endl;
+  }
 }
 
 /**
@@ -419,11 +425,12 @@
                                  (std::string const*)params, params+1));
 
   DiskUsageCounter::MountPointSet mounts;
-  mounts.insert( DiskUsageCounter::MountPoint("/") );
-  mounts.insert( DiskUsageCounter::MountPoint("/etc") );
-  mounts.insert( DiskUsageCounter::MountPoint("/opt/kde3/share/mimelnk/video") );
-  mounts.insert( DiskUsageCounter::MountPoint("/foo") );
-  mounts.insert( DiskUsageCounter::MountPoint("/bar") );
+//   mounts.insert( DiskUsageCounter::MountPoint("/") );
+//   mounts.insert( DiskUsageCounter::MountPoint("/etc") );
+//   mounts.insert( DiskUsageCounter::MountPoint("/opt/kde3/share/mimelnk/video") );
+//   mounts.insert( DiskUsageCounter::MountPoint("/foo") );
+//   mounts.insert( DiskUsageCounter::MountPoint("/bar") );
+  
   getZYpp()->setPartitions(mounts);
 
   test->add(BOOST_PARAM_TEST_CASE(&cache_write_susetags_normal_test,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/zypp/KeyRing.cc new/libzypp-3.19.0/tests/zypp/KeyRing.cc
--- old/libzypp-3.18.4/tests/zypp/KeyRing.cc    2007-08-27 17:47:46.000000000 +0200
+++ new/libzypp-3.19.0/tests/zypp/KeyRing.cc    2007-08-28 18:00:20.000000000 +0200
@@ -193,6 +193,13 @@
   //BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), 1 );
 
   /* check signature id can be extracted */
+  
+}
+
+void keyring_signature_test( const string &dir )
+{
+  PublicKey key( Pathname(dir) + "public.asc" );
+
   {
     KeyRingTestReceiver keyring_callbacks;
     KeyRingTestSignalReceiver receiver;
@@ -204,6 +211,11 @@
     BOOST_CHECK_THROW( keyring.readSignatureKeyId(Pathname()), Exception );
     TmpFile tmp;
     BOOST_CHECK_EQUAL( keyring.readSignatureKeyId(tmp.path()), "" );
+
+    keyring.importKey(key);
+
+    BOOST_CHECK(keyring.verifyFileSignature( Pathname(dir) + "repomd.xml", Pathname(dir) + "repomd.xml.asc"));
+    BOOST_CHECK( ! keyring.verifyFileSignature( Pathname(dir) + "repomd.xml.corrupted", Pathname(dir) + "repomd.xml.asc"));
   }
 }
 
@@ -229,6 +241,8 @@
   test_suite* test= BOOST_TEST_SUITE( "PublicKeyTest" );
   test->add(BOOST_PARAM_TEST_CASE( &keyring_test,
                               (std::string const*)params, params+1));
+  test->add(BOOST_PARAM_TEST_CASE( &keyring_signature_test,
+                              (std::string const*)params, params+1));
   return test;
 }
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/VERSION.cmake new/libzypp-3.19.0/VERSION.cmake
--- old/libzypp-3.18.4/VERSION.cmake    2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/VERSION.cmake    2007-08-28 18:00:21.000000000 +0200
@@ -45,6 +45,6 @@
 #
 
 SET(LIBZYPP_MAJOR "3")
-SET(LIBZYPP_MINOR "18")
-SET(LIBZYPP_COMPATMINOR "13")
-SET(LIBZYPP_PATCH "4")
+SET(LIBZYPP_MINOR "19")
+SET(LIBZYPP_COMPATMINOR "0")
+SET(LIBZYPP_PATCH "0")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/cache/ResolvableQuery.cc new/libzypp-3.19.0/zypp/cache/ResolvableQuery.cc
--- old/libzypp-3.18.4/zypp/cache/ResolvableQuery.cc    2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/cache/ResolvableQuery.cc    2007-08-28 18:00:21.000000000 +0200
@@ -186,29 +186,34 @@
     return alias;
   }
   
-  void iterateResolvablesByKind( zypp::Resolvable::Kind kind, ProcessResolvable fnc )
+  data::RecordId queryRepositoryId( const std::string &repo_alias )
   {
-    sqlite3_command cmd( _con, "select " + _fields + " from resolvables where kind=:kind;");
-    data::RecordId kind_id = _type_cache.idForKind( kind );
-    cmd.bind(":kind", kind_id);
+    long long id = 0;
+    sqlite3_command cmd( _con, "select id from repositories where alias=:alias;" );
+    cmd.bind( ":alias", repo_alias );
     sqlite3_reader reader = cmd.executereader();
-    while(reader.read())
+    while( reader.read() )
     {
-      fnc( reader.getint64(0), fromRow(reader) );
+      id = reader.getint64(0);
+      break;
     }
+    return id;
   }
   
-  void iterateResolvablesByKindsAndStrings( const std::vector<zypp::Resolvable::Kind> & kinds,
-                  const std::vector<std::string> &strings, int flags, ProcessResolvable fnc )
+  void iterateResolvablesByKindsAndStringsAndRepos( const std::vector<zypp::Resolvable::Kind> & kinds,
+                  const std::vector<std::string> &strings, int flags, const std::vector<std::string> repos, ProcessResolvable fnc )
   {
-    std::string sqlcmd( "SELECT " + _fields + " FROM resolvables WHERE (" );
+    std::string sqlcmd( "SELECT " + _fields + " FROM resolvables" );
+
     std::vector<std::string>::const_iterator it_s;
     for (it_s = strings.begin(); it_s != strings.end(); ++it_s)
     {
       std::string s( *it_s );
 
-      if (it_s != strings.begin())
-        sqlcmd += "AND";
+      if (it_s == strings.begin())
+        sqlcmd += " WHERE (";
+      else
+        sqlcmd += " AND ";
 
 //FIXME: Implement MATCH_RESSUMM and MATCH_RESDESC
 
@@ -231,19 +236,68 @@
       sqlcmd += s;
       sqlcmd += "'";
     }
-    sqlcmd += ") AND kind IN (";
+
+    if (it_s != strings.begin())
+    {
+      sqlcmd += ")";
+    }
 
     std::vector<zypp::Resolvable::Kind>::const_iterator it_k;
-    for (it_k = kinds.begin(); it_k != kinds.end(); ++it_k)
+    if (!kinds.empty())
     {
+      if (it_s == strings.begin())
+        sqlcmd += " WHERE";
+      else
+        sqlcmd += " AND";
+
+      for (it_k = kinds.begin(); it_k != kinds.end(); ++it_k)
+      {
+        if (it_k == kinds.begin())
+         sqlcmd += " kind IN (";
+       else
+          sqlcmd += ", ";
+
+        char idbuf[16];
+        snprintf( idbuf, 15, "%d", (int)(_type_cache.idForKind( *it_k )) );
+        sqlcmd += idbuf;
+      }
+
       if (it_k != kinds.begin())
-        sqlcmd += ", ";
-      char idbuf[16];
-      snprintf( idbuf, 15, "%d", (int)(_type_cache.idForKind( *it_k )) );
-      sqlcmd += idbuf;
+      {
+        sqlcmd += ")";
+      }
     }
-    sqlite3_command cmd( _con, sqlcmd + ")");
 
+    std::vector<std::string>::const_iterator it_r;
+    if (!repos.empty())
+    {
+      if (it_s == strings.begin()
+         && it_k == kinds.begin())
+        sqlcmd += " WHERE";
+      else
+        sqlcmd += " AND";
+
+      for (it_r = repos.begin(); it_r != repos.end(); ++it_r)
+      {
+        if (it_r == repos.begin())
+         sqlcmd += " (";
+       else
+          sqlcmd += " OR ";
+
+        sqlcmd += "repository_id = ";
+        char idbuf[16];
+        snprintf( idbuf, 15, "%ld", (long)(queryRepositoryId( *it_r )) );
+        sqlcmd += idbuf;
+      }
+
+      if (it_r != repos.begin())
+      {
+        sqlcmd += ")";
+      }
+    }
+
+MIL << "sqlcmd " << sqlcmd << endl;
+    sqlite3_command cmd( _con, sqlcmd );
     sqlite3_reader reader = cmd.executereader();
     while(reader.read())
     {
@@ -426,15 +480,10 @@
   return _pimpl->queryRepositoryAlias( repo_id );
 }
 
-void ResolvableQuery::iterateResolvablesByKind( zypp::Resolvable::Kind kind, ProcessResolvable fnc )
-{
-  return _pimpl->iterateResolvablesByKind( kind, fnc );
-}
-
-void ResolvableQuery::iterateResolvablesByKindsAndStrings( const std::vector<zypp::Resolvable::Kind> & kinds,
-                  const std::vector<std::string> &strings, int flags, ProcessResolvable fnc )
+void ResolvableQuery::iterateResolvablesByKindsAndStringsAndRepos( const std::vector<zypp::Resolvable::Kind> & kinds,
+                  const std::vector<std::string> &strings, int flags, const std::vector<std::string> &repos, ProcessResolvable fnc )
 {
-  _pimpl->iterateResolvablesByKindsAndStrings( kinds, strings, flags, fnc );
+  _pimpl->iterateResolvablesByKindsAndStringsAndRepos( kinds, strings, flags, repos, fnc );
 }
 //////////////////////////////////////////////////////////////////////////////
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/cache/ResolvableQuery.h new/libzypp-3.19.0/zypp/cache/ResolvableQuery.h
--- old/libzypp-3.18.4/zypp/cache/ResolvableQuery.h     2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/cache/ResolvableQuery.h     2007-08-28 18:00:21.000000000 +0200
@@ -243,21 +243,22 @@
       std::string queryRepositoryAlias( const data::RecordId &repo_id );
 
       /**
-       * \short Iterate resolvables by Kind
+       * \short Query repo id by alias
        */
-      void iterateResolvablesByKind( zypp::Resolvable::Kind kind, ProcessResolvable fnc );
+      data::RecordId queryRepositoryId( const std::string &repo_alias );
 
       /**
        * \short Iterate resolvables by Kinds and Strings
        * \param kinds kinds to match, will be ORed
        * \param names names to match, will be ANDed
-       * \param flags  MATCH_xxx, see above
+       * \param repos repository aliases to match, will be ORed
+       * \param flags  MATCH_xxx, see above; applied to 'names'
        * \param fnc callback to send the data to. (Will be called once per result)
        *
        * Beware: Searching for multiple strings with MATCH_EXACT will _not_ find anything, except if all strings are identical ...
        */
-      void iterateResolvablesByKindsAndStrings( const std::vector<zypp::Resolvable::Kind> & kinds,
-                  const std::vector<std::string> &strings, int flags, ProcessResolvable fnc );
+      void iterateResolvablesByKindsAndStringsAndRepos( const std::vector<zypp::Resolvable::Kind> & kinds,
+                  const std::vector<std::string> &names, int flags, const std::vector<std::string> &repos, ProcessResolvable fnc );
 
     private:
       /** Implementation. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/KeyRing.cc new/libzypp-3.19.0/zypp/KeyRing.cc
--- old/libzypp-3.18.4/zypp/KeyRing.cc  2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/KeyRing.cc  2007-08-28 18:00:21.000000000 +0200
@@ -64,10 +64,10 @@
 
   bool KeyRingReport::askUserToImportKey( const PublicKey &key)
   { return _keyRingDefaultAccept; }
-  
+
   bool KeyRingReport::askUserToAcceptVerificationFailed( const string &file, const PublicKey &key )
   { return _keyRingDefaultAccept; }
-  
+
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : KeyRing::Impl
@@ -96,12 +96,12 @@
 
     void importKey( const PublicKey &key, bool trusted = false);
     void deleteKey( const string &id, bool trusted );
-    
+
     string readSignatureKeyId( const Pathname &signature );
-    
+
     bool isKeyTrusted( const string &id);
     bool isKeyKnown( const string &id );
-    
+
     list<PublicKey> trustedPublicKeys();
     list<PublicKey> publicKeys();
 
@@ -121,10 +121,10 @@
     PublicKey exportKey( string id, const Pathname &keyring);
     void dumpPublicKey( const string &id, const Pathname &keyring, ostream &stream );
     void deleteKey( const string &id, const Pathname &keyring );
-    
+
     list<PublicKey> publicKeys(const Pathname &keyring);
     list<string> publicKeyIds(const Pathname &keyring);
-    
+
     bool publicKeyExists( string id, const Pathname &keyring);
 
     const Pathname generalKeyRing() const;
@@ -162,13 +162,16 @@
 
   void KeyRing::Impl::importKey( const PublicKey &key, bool trusted)
   {
+    callback::SendReport<target::rpm::KeyRingSignals> rpmdbEmitSignal;
     callback::SendReport<KeyRingSignals> emitSignal;
 
     importKey( key.path(), trusted ? trustedKeyRing() : generalKeyRing() );
-    
+
     if ( trusted )
+    {
+      rpmdbEmitSignal->trustedKeyAdded( key );
       emitSignal->trustedKeyAdded( key );
-    
+    }
   }
 
   void KeyRing::Impl::deleteKey( const string &id, bool trusted)
@@ -195,7 +198,7 @@
   {
     return publicKeyIds( trustedKeyRing() );
   }
-  
+
   bool KeyRing::Impl::verifyFileTrustedSignature( const Pathname &file, const Pathname &signature)
   {
     return verifyFile( file, signature, trustedKeyRing() );
@@ -210,7 +213,7 @@
   {
     return publicKeyExists( id, trustedKeyRing() );
   }
-  
+
   bool KeyRing::Impl::isKeyKnown( const string &id )
   {
     MIL << endl;
@@ -219,7 +222,7 @@
     else
       return publicKeyExists( id, generalKeyRing() );
   }
-  
+
   bool KeyRing::Impl::publicKeyExists( string id, const Pathname &keyring)
   {
     MIL << "Searching key [" << id << "] in keyring " << keyring << endl;
@@ -231,13 +234,13 @@
     }
     return false;
   }
-  
+
   PublicKey KeyRing::Impl::exportKey( string id, const Pathname &keyring)
   {
     TmpFile tmp_file( _base_dir, "pubkey-"+id+"-" );
     Pathname keyfile = tmp_file.path();
     MIL << "Going to export key " << id << " from " << keyring << " to " << keyfile << endl;
-     
+
     try {
       ofstream os(keyfile.asString().c_str());
       dumpPublicKey( id, keyring, os );
@@ -261,7 +264,7 @@
   {
      dumpPublicKey( id, ( trusted ? trustedKeyRing() : generalKeyRing() ), stream );
   }
-  
+
   void KeyRing::Impl::dumpPublicKey( const string &id, const Pathname &keyring, ostream &stream )
   {
     const char* argv[] =
@@ -312,7 +315,7 @@
     if ( publicKeyExists( id, trustedKeyRing() ) )
     {
       PublicKey key = exportKey( id, trustedKeyRing() );
-      
+
       MIL << "Key " << id << " " << key.name() << " is trusted" << endl;
       // it exists, is trusted, does it validates?
       if ( verifyFile( file, signature, trustedKeyRing() ) )
@@ -398,7 +401,7 @@
     static str::regex rxColonsFpr("^([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):\n$");
 
     list<string> ids;
-    
+
     const char* argv[] =
     {
       GPG_BINARY,
@@ -416,7 +419,7 @@
       keyring.asString().c_str(),
       NULL
     };
-    
+
     ExternalProgram prog(argv,ExternalProgram::Discard_Stderr, false, -1, true);
     string line;
     int count = 0;
@@ -432,7 +435,7 @@
         if ( what[1] == "pub" )
         {
           id = what[5];
-          
+
           string line2;
           for(line2 = prog.receiveLine(); !line2.empty(); line2 = prog.receiveLine(), count++ )
           {
@@ -446,7 +449,7 @@
               }
             }
           }
-          
+
           ids.push_back(id);
           MIL << "Found key " << "[" << id << "]" << endl;
         }
@@ -456,14 +459,14 @@
     prog.close();
     return ids;
   }
-  
+
   list<PublicKey> KeyRing::Impl::publicKeys(const Pathname &keyring)
   {
-    
+
     list<PublicKey> keys;
-    
+
     list<string> ids = publicKeyIds(keyring);
-    
+
     for ( list<string>::const_iterator it = ids.begin(); it != ids.end(); ++it )
     {
       PublicKey key(exportKey( *it, keyring ));
@@ -472,12 +475,12 @@
     }
     return keys;
   }
-    
+
   void KeyRing::Impl::importKey( const Pathname &keyfile, const Pathname &keyring)
   {
     if ( ! PathInfo(keyfile).isExist() )
       ZYPP_THROW(KeyRingException("Tried to import not existant key " + keyfile.asString() + " into keyring " + keyring.asString()));
-    
+
     const char* argv[] =
     {
       GPG_BINARY,
@@ -540,7 +543,6 @@
     MIL << "Determining key id if signature " << signature << endl;
     // HACK create a tmp keyring with no keys
     TmpDir dir(_base_dir, "fake-keyring");
-    TmpFile fakeData(_base_dir, "fake-data");
 
     const char* argv[] =
     {
@@ -554,9 +556,7 @@
       "1",
       "--homedir",
       dir.path().asString().c_str(),
-      "--verify",
       signature.asString().c_str(),
-      fakeData.path().asString().c_str(),
       NULL
     };
 
@@ -668,12 +668,12 @@
   //
   ///////////////////////////////////////////////////////////////////
 
-  
+
   void KeyRing::importKey( const PublicKey &key, bool trusted )
   {
-    _pimpl->importKey( key.path(), trusted );    
+    _pimpl->importKey( key.path(), trusted );
   }
-  
+
   string KeyRing::readSignatureKeyId( const Pathname &signature )
   {
     return _pimpl->readSignatureKeyId(signature);
@@ -703,7 +703,7 @@
   {
     return _pimpl->trustedPublicKeyIds();
   }
-  
+
   bool KeyRing::verifyFileSignatureWorkflow( const Pathname &file, const string filedesc, const Pathname &signature)
   {
     return _pimpl->verifyFileSignatureWorkflow(file, filedesc, signature);
@@ -728,12 +728,12 @@
   {
     return _pimpl->isKeyTrusted(id);
   }
-     
+
   bool KeyRing::isKeyKnown( const string &id )
   {
     return _pimpl->isKeyKnown(id);
   }
-  
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/KeyRing.h new/libzypp-3.19.0/zypp/KeyRing.h
--- old/libzypp-3.18.4/zypp/KeyRing.h   2007-08-27 17:47:46.000000000 +0200
+++ new/libzypp-3.19.0/zypp/KeyRing.h   2007-08-28 18:00:20.000000000 +0200
@@ -32,35 +32,35 @@
 
   struct KeyRingReport : public callback::ReportBase
   {
-    
+
     virtual bool askUserToAcceptUnsignedFile( const std::string &file );
-    
+
     /**
      * we DONT know the key, only its id, but we have never seen it, the difference
      * with trust key is that if you dont have it, you can't import it later.
      * The answer means continue yes or no?
      */
     virtual bool askUserToAcceptUnknownKey( const std::string &file, const std::string &id );
-    
+
     /**
      * This basically means, we know the key, but it is not trusted, Continue
      * yes or no?. Nothing else is performed (import, etc)
      */
     virtual bool askUserToTrustKey( const PublicKey &key);
-    
-    
+
+
     /**
      * Import the key.
      * This means saving the key in the trusted database so next run it will appear as trusted.
-     * Nothing to do with trustKey, as you CAN trust a key without importing it, 
-     * basically you will be asked every time again. 
-     * There are programs who prefer to manage the trust keyring on their own and use trustKey 
+     * Nothing to do with trustKey, as you CAN trust a key without importing it,
+     * basically you will be asked every time again.
+     * There are programs who prefer to manage the trust keyring on their own and use trustKey
      * without importing it into rpm.
      */
     virtual bool askUserToImportKey( const PublicKey &key);
     virtual bool askUserToAcceptVerificationFailed( const std::string &file, const PublicKey &key );
   };
-  
+
   struct KeyRingSignals : public callback::ReportBase
   {
     virtual void trustedKeyAdded( const PublicKey &/*key*/ )
@@ -87,7 +87,7 @@
        /** Dtor. */
        virtual ~KeyRingException() throw() {};
    };
-  
+
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : KeyRing
@@ -113,31 +113,31 @@
      * throw if key was not imported
      */
     void importKey( const PublicKey &key, bool trusted = false);
-    
+
     void dumpTrustedPublicKey( const std::string &id, std::ostream &stream )
     { dumpPublicKey(id, true, stream); }
-    
+
     void dumpUntrustedPublicKey( const std::string &id, std::ostream &stream )
     { dumpPublicKey(id, false, stream); }
-    
+
     void dumpPublicKey( const std::string &id, bool trusted, std::ostream &stream );
-    
+
     /**
      * reads the public key id from a signature
      */
     std::string readSignatureKeyId( const Pathname &signature );
-    
+
     /**
      * true if the key id is trusted
      */
     bool isKeyTrusted( const std::string &id);
-    
+
     /**
      * true if the key id is knows, that means
      * at least exist on the untrusted keyring
      */
     bool isKeyKnown( const std::string &id );
-    
+
     /**
      * removes a key from the keyring.
      * If trusted is true, Remove it from trusted keyring too.
@@ -148,25 +148,25 @@
      * Get a list of public keys in the keyring
      */
     std::list<PublicKey> publicKeys();
-    
+
     /**
      * Get a list of trusted public keys in the keyring
      */
     std::list<PublicKey> trustedPublicKeys();
-    
+
     /**
      * Get a list of public key ids in the keyring
      */
     std::list<std::string> publicKeyIds();
-    
+
     /**
      * Get a list of trusted public key ids in the keyring
      */
     std::list<std::string> trustedPublicKeyIds();
-    
+
     /**
      * Follows a signature verification interacting with the user.
-     * The boolr eturned depends on user desicion to trust or not.
+     * The bool returned depends on user decision to trust or not.
      */
     bool verifyFileSignatureWorkflow( const Pathname &file, const std::string filedesc, const Pathname &signature);
     bool verifyFileSignature( const Pathname &file, const Pathname &signature);
@@ -194,7 +194,19 @@
     return str;
   }
 
-  /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+
+  namespace target
+  {
+    namespace rpm
+    {
+      /** Internal connection to rpm database. Not for public use. */
+      struct KeyRingSignals : public ::zypp::KeyRingSignals
+      {};
+    }
+  }
+
+ /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
 #endif // ZYPP_KEYRING_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/PackagesDuFileReader.cc new/libzypp-3.19.0/zypp/parser/susetags/PackagesDuFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesDuFileReader.cc     2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/parser/susetags/PackagesDuFileReader.cc     2007-08-28 18:00:20.000000000 +0200
@@ -47,10 +47,6 @@
          {
             _mounts = getZYpp()->getPartitions();
             
-            // try to detect partitions if empty
-            if (_mounts.empty() )
-              _mounts =  DiskUsageCounter::detectMountPoints();
-            
             for ( DiskUsageCounter::MountPointSet::const_iterator it = _mounts.begin();
                   it != _mounts.end();
                   ++ it )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc new/libzypp-3.19.0/zypp/parser/susetags/PackagesFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc       2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/parser/susetags/PackagesFileReader.cc       2007-08-28 18:00:20.000000000 +0200
@@ -40,6 +40,7 @@
        public:
          Impl( const PackagesFileReader & parent_r )
          : BaseImpl( parent_r )
+          , _sysarch( ZConfig::instance().systemArchitecture() )
          {}
 
          virtual ~Impl()
@@ -57,7 +58,13 @@
            ret.swap( _pkgData );
            _srcpkgData = 0;
            _data       = 0;
-           return ret;
+            //  Filter unwanted stuff
+            if ( ret
+                 && ! ret->arch.compatibleWith( _sysarch ) )
+            {
+                return 0;
+            }
+            return ret;
          }
 
          data::SrcPackage_Ptr handoutSourcepackage()
@@ -298,6 +305,7 @@
          data::Packagebase_Ptr   _data;
          data::Package_Ptr       _pkgData;
          data::SrcPackage_Ptr    _srcpkgData;
+          Arch                    _sysarch;
       };
       ///////////////////////////////////////////////////////////////////
 
@@ -313,7 +321,6 @@
       //       METHOD TYPE : Ctor
       //
       PackagesFileReader::PackagesFileReader()
-      : _sysarch( ZConfig::instance().systemArchitecture() )
       {}
 
       ///////////////////////////////////////////////////////////////////
@@ -352,7 +359,7 @@
            if ( _pkgConsumer )
            {
              data::Package_Ptr ptr = _pimpl->handoutPackage();
-             if (ptr && ptr->arch.compatibleWith( _sysarch ))
+             if ( ptr )
                _pkgConsumer( ptr );
            }
          }
@@ -414,8 +421,8 @@
          if ( _pkgConsumer )
          {
            data::Package_Ptr ptr = _pimpl->handoutPackage();
-           if (ptr && ptr->arch.compatibleWith( _sysarch ))
-             _pkgConsumer( ptr );
+            if ( ptr )
+              _pkgConsumer( ptr );
          }
        }
        else if ( _pimpl->hasSourcepackage() )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.h new/libzypp-3.19.0/zypp/parser/susetags/PackagesFileReader.h
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.h        2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/parser/susetags/PackagesFileReader.h        2007-08-28 18:00:20.000000000 +0200
@@ -45,8 +45,6 @@
       /** */
       class PackagesFileReader : public FileReaderBase
       {
-       private:
-         Arch _sysarch;
        public:
          typedef function<void(const data::Package_Ptr &)> PkgConsumer;
          typedef function<void(const data::SrcPackage_Ptr &)> SrcPkgConsumer;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/yum/PatchFileReader.cc new/libzypp-3.19.0/zypp/parser/yum/PatchFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/yum/PatchFileReader.cc       2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/parser/yum/PatchFileReader.cc       2007-08-28 18:00:20.000000000 +0200
@@ -306,6 +306,14 @@
 
   bool PatchFileReader::Impl::consumeAtomsNode(Reader & reader_r)
   {
+    /*
+       Implementation note:
+
+       !!! do _NOT_ filter out incompatible architectures of atoms !!!
+
+       See https://bugzilla.novell.com/show_bug.cgi?id=300569#c11
+     */
+
     // consumePackageNode
     if (isBeingProcessed(tag_package) && consumePackageNode(reader_r))
       return true;
@@ -401,6 +409,14 @@
 
   bool PatchFileReader::Impl::consumePackageNode(Reader & reader_r)
   {
+    /*
+       Implementation note:
+
+       !!! do _NOT_ filter out incompatible architectures of atoms !!!
+
+       See https://bugzilla.novell.com/show_bug.cgi?id=300569#c11
+     */
+
     if (isBeingProcessed(tag_patchrpm) && consumePatchrpmNode(reader_r))
       return true;
     else if (isBeingProcessed(tag_deltarpm) && consumeDeltarpmNode(reader_r))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/RepoManager.cc new/libzypp-3.19.0/zypp/RepoManager.cc
--- old/libzypp-3.18.4/zypp/RepoManager.cc      2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/RepoManager.cc      2007-08-28 18:00:20.000000000 +0200
@@ -617,9 +617,13 @@
   ////////////////////////////////////////////////////////////////////////////
 
   void RepoManager::cleanMetadata( const RepoInfo &info,
-                                   const ProgressData::ReceiverFnc & progress )
+                                   const ProgressData::ReceiverFnc & progressfnc )
   {
+    ProgressData progress(100);
+    progress.sendTo(progressfnc);
+
     filesystem::recursive_rmdir(rawcache_path_for_repoinfo(_pimpl->options, info));
+    progress.toMax();
   }
 
   void RepoManager::buildCache( const RepoInfo &info,
@@ -1062,11 +1066,12 @@
           }
         }
 
-        CombinedProgressData subprogrcv(progress);
-        
+        CombinedProgressData subprogrcv(progress, 70);
+        CombinedProgressData cleansubprogrcv(progress, 30);
         // now delete it from cache
         cleanCache( todelete, subprogrcv);
-
+        // now delete metadata (#301037)
+        cleanMetadata( todelete, cleansubprogrcv);
         MIL << todelete.alias() << " sucessfully deleted." << endl;
         return;
       } // else filepath is empty
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc new/libzypp-3.19.0/zypp/solver/detail/Resolver_problems.cc
--- old/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc  2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/solver/detail/Resolver_problems.cc  2007-08-28 18:00:21.000000000 +0200
@@ -891,7 +891,7 @@
                case RESOLVER_INFO_TYPE_NO_PROVIDER: {                  // There are no installable providers of c [for p]
                    ResolverInfoMisc_constPtr misc_info = dynamic_pointer_cast<const ResolverInfoMisc>(info);
                    // TranslatorExplanation %s = name requirement ...                          
-                   what = str::form (_("Requirement %s cannot be fulfilled."), misc_info->capability().asString().c_str());               
+                   what = str::form (_("Requirememt %s cannot be fulfilled."), misc_info->capability().asString().c_str());               
                    details = misc_info->message() + "\n";
                    ResolverProblem_Ptr problem = new ResolverProblem (what, details);
                    problems.push_back (problem);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc new/libzypp-3.19.0/zypp/target/store/XMLFilesBackend.cc
--- old/libzypp-3.18.4/zypp/target/store/XMLFilesBackend.cc     2007-08-27 17:47:47.000000000 +0200
+++ new/libzypp-3.19.0/zypp/target/store/XMLFilesBackend.cc     2007-08-28 18:00:20.000000000 +0200
@@ -274,16 +274,6 @@
   bool nmthere = exists(dirForNamedFlags());
   ok = ok && nmthere;
 
-  Pathname sourcesdir = d->root + ZYPP_DB_DIR + "/sources";
-  bool srcthere = PathInfo(sourcesdir).isExist();
-  ok = ok && srcthere;
-
-  if (srcthere && fixperms)
-  {
-    MIL << "Making " << sourcesdir << " not readable by others (0700)" << std::endl;
-    filesystem::chmod( sourcesdir, 0700);
-  }
-
   return ok;
 }
 
@@ -328,13 +318,6 @@
     ZYPP_THROW(Exception("Cannot create directory " + namedflags.asString()));
   else
     MIL << "Created " << namedflags.asString() << std::endl;
-
-  // create dir for source list
-  Pathname source_p = d->root + Pathname(ZYPP_DB_DIR) + Pathname("/sources/");
-  if (0 != assert_dir(source_p, 0700))
-    ZYPP_THROW(Exception("Cannot create directory " + source_p.asString()));
-  else
-    MIL << "Created " << source_p.asString() << std::endl;
 }
 
 void XMLFilesBackend::setRandomFileNameEnabled( bool enabled )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/zypp_detail/ZYppImpl.cc new/libzypp-3.19.0/zypp/zypp_detail/ZYppImpl.cc
--- old/libzypp-3.18.4/zypp/zypp_detail/ZYppImpl.cc     2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/zypp_detail/ZYppImpl.cc     2007-08-28 18:00:21.000000000 +0200
@@ -133,7 +133,6 @@
     , _target(0)
     , _resolver( new Resolver(_pool.accessor()) )
     , _architecture( defaultArchitecture() )
-    , _disk_usage()
     {
       MIL << "libzypp: " << VERSION << " built " << __DATE__ << " " <<  __TIME__ << endl;
       MIL << "defaultTextLocale: '" << _textLocale << "'" << endl;
@@ -180,13 +179,21 @@
     }
 
     DiskUsageCounter::MountPointSet ZYppImpl::diskUsage()
-    { return _disk_usage.disk_usage(pool()); }
+    { return _disk_usage->disk_usage(pool()); }
 
     void ZYppImpl::setPartitions(const DiskUsageCounter::MountPointSet &mp)
-    { _disk_usage.setMountPoints(mp); }
+    {
+      _disk_usage.reset(new DiskUsageCounter());
+      _disk_usage->setMountPoints(mp);
+    }
 
     DiskUsageCounter::MountPointSet ZYppImpl::getPartitions() const
-    { return _disk_usage.getMountPoints(); }
+    {
+      if (_disk_usage)
+        return _disk_usage->getMountPoints();
+      else
+        return DiskUsageCounter::detectMountPoints();
+    }
 
     //------------------------------------------------------------------------
     // target
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/zypp_detail/ZYppImpl.h new/libzypp-3.19.0/zypp/zypp_detail/ZYppImpl.h
--- old/libzypp-3.18.4/zypp/zypp_detail/ZYppImpl.h      2007-08-27 17:47:48.000000000 +0200
+++ new/libzypp-3.19.0/zypp/zypp_detail/ZYppImpl.h      2007-08-28 18:00:21.000000000 +0200
@@ -164,7 +164,7 @@
       /** */
       Pathname _home_path;
       /** defined mount points, used for disk usage counting */
-      DiskUsageCounter _disk_usage;
+      shared_ptr<DiskUsageCounter> _disk_usage;
     };
     ///////////////////////////////////////////////////////////////////
 



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

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

< Previous Next >