Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit libzypp
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 27 Aug 2007 17:53:54 +0200
  • Message-id: <20070827155354.6429A678182@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libzypp
checked in at Mon Aug 27 17:53:54 CEST 2007.

--------
--- libzypp/libzypp.changes     2007-08-26 16:27:53.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes        2007-08-27 17:51:39.838142000 +0200
@@ -1,0 +2,23 @@
+Mon Aug 27 17:08:41 CEST 2007 - kkaempf@xxxxxxx
+
+- Add ZConfig::overrideSystemArchitecture() to override zypp arch
+  from external, e.g. for the testcases
+- Honor ZYPP_CONF environment variable to override the buit-in
+  /etc/zypp/zypp.conf
+- Check architecture at handout() to prevent NULL ptr reference.
+- Bug 301286
+- rev 6908
+
+-------------------------------------------------------------------
+Mon Aug 27 15:53:52 CEST 2007 - schubi@xxxxxxx
+
+-The solver generate an establish call for all
+ resolvables which has filesystemcaps if there is not a valid result from a
+ former solver run available. This covers:
+ * Initial solver run
+ * Changing of filesystem whithin a workflow, cause the solver results will
+   be reset if the filesystem dependencies have been changed
+ Bug 271912
+- r 6901 
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.r24393/_old  2007-08-27 17:53:39.000000000 +0200
+++ /var/tmp/diff_new_pack.r24393/_new  2007-08-27 17:53:39.000000000 +0200
@@ -17,7 +17,7 @@
 Autoreqprov:    on
 Summary:        Package, Patch, Pattern, and Product Management
 Version:        3.18.4
-Release:        4
+Release:        5
 Source:         libzypp-3.18.4.tar.bz2
 Source1:        libzypp-rpmlintrc
 Prefix:         /usr
@@ -125,6 +125,23 @@
 %{_libdir}/pkgconfig/libzypp.pc
 
 %changelog
+* Mon Aug 27 2007 - kkaempf@xxxxxxx
+- Add ZConfig::overrideSystemArchitecture() to override zypp arch
+  from external, e.g. for the testcases
+- Honor ZYPP_CONF environment variable to override the buit-in
+  /etc/zypp/zypp.conf
+- Check architecture at handout() to prevent NULL ptr reference.
+- Bug 301286
+- rev 6908
+* Mon Aug 27 2007 - schubi@xxxxxxx
+-The solver generate an establish call for all
+  resolvables which has filesystemcaps if there is not a valid result from a
+  former solver run available. This covers:
+  * Initial solver run
+  * Changing of filesystem whithin a workflow, cause the solver results will
+  be reset if the filesystem dependencies have been changed
+  Bug 271912
+- r 6901
 * Sun Aug 26 2007 - kkaempf@xxxxxxx
 - pass location to plaindir package (#303751)
 - Add name of file in question to checksum/signature related

++++++ libzypp-3.18.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/package/libzypp.changes new/libzypp-3.18.4/package/libzypp.changes
--- old/libzypp-3.18.4/package/libzypp.changes  2007-08-26 16:26:51.000000000 +0200
+++ new/libzypp-3.18.4/package/libzypp.changes  2007-08-27 17:47:46.000000000 +0200
@@ -1,4 +1,27 @@
 -------------------------------------------------------------------
+Mon Aug 27 17:08:41 CEST 2007 - kkaempf@xxxxxxx
+
+- Add ZConfig::overrideSystemArchitecture() to override zypp arch
+  from external, e.g. for the testcases
+- Honor ZYPP_CONF environment variable to override the buit-in
+  /etc/zypp/zypp.conf
+- Check architecture at handout() to prevent NULL ptr reference.
+- Bug 301286
+- rev 6908
+
+-------------------------------------------------------------------
+Mon Aug 27 15:53:52 CEST 2007 - schubi@xxxxxxx
+
+-The solver generate an establish call for all
+ resolvables which has filesystemcaps if there is not a valid result from a
+ former solver run available. This covers:
+ * Initial solver run
+ * Changing of filesystem whithin a workflow, cause the solver results will
+   be reset if the filesystem dependencies have been changed
+ Bug 271912
+- r 6901 
+
+-------------------------------------------------------------------
 Sun Aug 26 15:49:27 CEST 2007 - kkaempf@xxxxxxx
 
 - pass location to plaindir package (#303751)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/cache/CacheInitializer_test.cc new/libzypp-3.18.4/tests/cache/CacheInitializer_test.cc
--- old/libzypp-3.18.4/tests/cache/CacheInitializer_test.cc     2007-08-26 16:26:51.000000000 +0200
+++ new/libzypp-3.18.4/tests/cache/CacheInitializer_test.cc     2007-08-27 17:47:46.000000000 +0200
@@ -6,6 +6,7 @@
 #include "zypp/base/Logger.h"
 #include "zypp/Arch.h"
 #include "zypp/TmpPath.h"
+#include "zypp/ZConfig.h"
 #include "zypp/cache/CacheInitializer.h"
 #include "zypp/cache/sqlite3x/sqlite3x.hpp"
 
@@ -59,6 +60,7 @@
 test_suite*
 init_unit_test_suite( int, char* [] )
 {
+    ZConfig::instance().overrideSystemArchitecture( Arch( "i686" ) );
     test_suite* test= BOOST_TEST_SUITE( "CacheInit" );
     test->add( BOOST_TEST_CASE( &cacheinit_test ), 0 /* expected zero error */ );
     return test;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/cache/CacheQuery_test.cc new/libzypp-3.18.4/tests/cache/CacheQuery_test.cc
--- old/libzypp-3.18.4/tests/cache/CacheQuery_test.cc   2007-08-26 16:26:51.000000000 +0200
+++ new/libzypp-3.18.4/tests/cache/CacheQuery_test.cc   2007-08-27 17:47:46.000000000 +0200
@@ -12,6 +12,7 @@
 #include "zypp/ZYpp.h"
 #include "zypp/ZYppFactory.h"
 #include "zypp/TmpPath.h"
+#include "zypp/ZConfig.h"
 
 #include "zypp/cache/CacheStore.h"
 #include "zypp/data/ResolvableData.h"
@@ -70,6 +71,8 @@
   {
     datadir = argv[1];
   }
+
+  ZConfig::instance().overrideSystemArchitecture( Arch( "i686" ) );
   
   test_suite* test= BOOST_TEST_SUITE("CacheStore");
   
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/cache/CacheStore_test.cc new/libzypp-3.18.4/tests/cache/CacheStore_test.cc
--- old/libzypp-3.18.4/tests/cache/CacheStore_test.cc   2007-08-26 16:26:51.000000000 +0200
+++ new/libzypp-3.18.4/tests/cache/CacheStore_test.cc   2007-08-27 17:47:46.000000000 +0200
@@ -27,8 +27,9 @@
 #include "zypp/Pattern.h"
 #include "zypp/Product.h"
 #include "zypp/Patch.h"
-
+#include "zypp/DiskUsageCounter.h"
 #include "zypp/ZYppFactory.h"
+#include "zypp/ZConfig.h"
 
 #include "zypp/detail/ImplConnect.h"
 
@@ -297,7 +298,7 @@
   ResStore dbres = get_resolvables( alias, tmpdir);;;
   //read_resolvables( alias, tmpdir, std::inserter(dbres, dbres.end()));
   MIL << dbres.size() << " resolvables" << endl;
-  BOOST_CHECK_EQUAL( dbres.size(), (unsigned)48);
+  BOOST_CHECK_EQUAL( dbres.size(), (unsigned)35);
 
   bool found_glabels_i586 = false;
   for ( ResStore::const_iterator it = dbres.begin();
@@ -409,6 +410,8 @@
     datadir = argv[1];
   }
 
+  ZConfig::instance().overrideSystemArchitecture( Arch( "i686" ) );
+
   test_suite* test= BOOST_TEST_SUITE("CacheStore");
 
   std::string const params[] = { datadir };
@@ -422,7 +425,7 @@
   mounts.insert( DiskUsageCounter::MountPoint("/foo") );
   mounts.insert( DiskUsageCounter::MountPoint("/bar") );
   getZYpp()->setPartitions(mounts);
-  
+
   test->add(BOOST_PARAM_TEST_CASE(&cache_write_susetags_normal_test,
                                  (std::string const*)params, params+1));
   test->add(BOOST_PARAM_TEST_CASE(&cache_write_susetags_gz_test,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/tests/README new/libzypp-3.18.4/tests/README
--- old/libzypp-3.18.4/tests/README     2007-08-26 16:26:51.000000000 +0200
+++ new/libzypp-3.18.4/tests/README     2007-08-27 17:47:46.000000000 +0200
@@ -1,3 +1,7 @@
 
 You can find here unit tests for lot of zypp classes.
 
+run 
+ctest .
+
+or the binary itself to run just one test 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc new/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc
--- old/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc       2007-08-26 16:26:52.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/plaindir/RepoParser.cc       2007-08-27 17:47:47.000000000 +0200
@@ -121,7 +121,13 @@
   pkg->deps[Dep::OBSOLETES]   = header->tag_obsoletes( filerequires );
   pkg->deps[Dep::ENHANCES]    = header->tag_enhances( filerequires );
   pkg->deps[Dep::SUPPLEMENTS] = header->tag_supplements( filerequires );
-  
+  pkg->vendor                 = header->tag_vendor();
+  pkg->installedSize          = header->tag_size();
+  pkg->buildTime              = header->tag_buildtime();
+  pkg->summary                = (TranslatedText)header->tag_summary();
+  pkg->description            = (TranslatedText)header->tag_description();
+  pkg->licenseToConfirm       = (TranslatedText)header->tag_license();
+
 //   Dependencies deps;
   
 //    RecordId shareDataWith;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc new/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc       2007-08-26 16:26:52.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.cc       2007-08-27 17:47:47.000000000 +0200
@@ -37,12 +37,9 @@
       /** PackagesFileReader implementation. */
       class PackagesFileReader::Impl : public BaseImpl
       {
-       private:
-         Arch _sysarch;
        public:
          Impl( const PackagesFileReader & parent_r )
          : BaseImpl( parent_r )
-         , _sysarch( ZConfig::instance().systemArchitecture() )
          {}
 
          virtual ~Impl()
@@ -95,25 +92,13 @@
            }
            else
            {
-             Arch pkgarch( words[3] );
-             if ( pkgarch.compatibleWith( _sysarch ) )
-             {
-               ++_c_pkg;
-               _data = _pkgData = new data::Package;
-               _data->arch = Arch( words[3] );
-             }
-             else
-             {
-               _data = _pkgData = 0;
-             }
+             ++_c_pkg;
+             _data = _pkgData = new data::Package;
              _srcpkgData = 0;
+             _data->arch = Arch( words[3] );
            }
-
-           if (_data)
-           {
-             _data->name    = words[0];
-             _data->edition = Edition( words[1],words[2] );
-           }
+           _data->name    = words[0];
+           _data->edition = Edition( words[1],words[2] );
          }
 
          /** Consume =Cks:. */
@@ -328,6 +313,7 @@
       //       METHOD TYPE : Ctor
       //
       PackagesFileReader::PackagesFileReader()
+      : _sysarch( ZConfig::instance().systemArchitecture() )
       {}
 
       ///////////////////////////////////////////////////////////////////
@@ -364,7 +350,11 @@
          if ( _pimpl->hasPackage() )
          {
            if ( _pkgConsumer )
-             _pkgConsumer( _pimpl->handoutPackage() );
+           {
+             data::Package_Ptr ptr = _pimpl->handoutPackage();
+             if (ptr && ptr->arch.compatibleWith( _sysarch ))
+               _pkgConsumer( ptr );
+           }
          }
          else if ( _pimpl->hasSourcepackage() )
          {
@@ -422,7 +412,11 @@
        if ( _pimpl->hasPackage() )
        {
          if ( _pkgConsumer )
-           _pkgConsumer( _pimpl->handoutPackage() );
+         {
+           data::Package_Ptr ptr = _pimpl->handoutPackage();
+           if (ptr && ptr->arch.compatibleWith( _sysarch ))
+             _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.18.4/zypp/parser/susetags/PackagesFileReader.h
--- old/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.h        2007-08-26 16:26:52.000000000 +0200
+++ new/libzypp-3.18.4/zypp/parser/susetags/PackagesFileReader.h        2007-08-27 17:47:47.000000000 +0200
@@ -45,6 +45,8 @@
       /** */
       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/solver/detail/Resolver.cc new/libzypp-3.18.4/zypp/solver/detail/Resolver.cc
--- old/libzypp-3.18.4/zypp/solver/detail/Resolver.cc   2007-08-26 16:26:52.000000000 +0200
+++ new/libzypp-3.18.4/zypp/solver/detail/Resolver.cc   2007-08-27 17:47:48.000000000 +0200
@@ -34,6 +34,7 @@
 #include "zypp/ZYppFactory.h"
 #include "zypp/SystemResObject.h"
 #include "zypp/solver/detail/ResolverInfoNeededBy.h"
+#include "zypp/capability/FilesystemCap.h"
 
 
 /////////////////////////////////////////////////////////////////////////
@@ -837,6 +838,26 @@
 
 //---------------------------------------------------------------------------
 
+struct FileSystemEstablishItem
+{
+    Resolver & resolver;
+    
+    FileSystemEstablishItem (Resolver & r)
+       : resolver (r)
+    { }
+
+    // items with filecaps has to be evaluate again via establish
+
+    bool operator()( const CapAndItem & cai )
+    {
+       _XDEBUG( "QueueItemInstall::FileSystemEstablishItem (" << cai.item << ", " << cai.cap << ")");
+       resolver.addPoolItemToEstablish (cai.item);
+       return true;
+    }
+};
+
+
+
 bool
 Resolver::resolveDependencies (const ResolverContext_Ptr context)
 {
@@ -885,7 +906,14 @@
 
        the_world = local_multiworld;
     }
-#endif
+#endif    
+
+    // Checking if we have to make additional establish concerning filesystem capabilities
+    FileSystemEstablishItem establish(*this);
+    Dep dep( Dep::SUPPLEMENTS);
+    invokeOnEach( pool().byCapabilityIndexBegin( "filesystem()", dep ), // begin()
+                         pool().byCapabilityIndexEnd( "filesystem()", dep ),   // end()
+                         functor::functorRef<bool,CapAndItem>( establish ) );
 
     // create initial_queue
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc new/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc
--- old/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc  2007-08-26 16:26:53.000000000 +0200
+++ new/libzypp-3.18.4/zypp/solver/detail/Resolver_problems.cc  2007-08-27 17:47:48.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 (_("Requirememt %s cannot be fulfilled."), misc_info->capability().asString().c_str());               
+                   what = str::form (_("Requirement %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/ZConfig.cc new/libzypp-3.18.4/zypp/ZConfig.cc
--- old/libzypp-3.18.4/zypp/ZConfig.cc  2007-08-26 16:26:53.000000000 +0200
+++ new/libzypp-3.18.4/zypp/ZConfig.cc  2007-08-27 17:47:48.000000000 +0200
@@ -41,7 +41,11 @@
           autolock_untrustedvendor(false)
       {
         MIL << "ZConfig singleton created." << endl;
-        Pathname confpath("/etc/zypp/zypp.conf");
+
+       // ZYPP_CONF might override /etc/zypp/zypp.conf
+
+        const char *env_confpath = getenv( "ZYPP_CONF" );
+        Pathname confpath( env_confpath ? env_confpath : "/etc/zypp/zypp.conf" );
         if ( PathInfo(confpath).isExist())
         {
           InputStream is(confpath);
@@ -49,7 +53,7 @@
         }
         else
         {
-          MIL << "No /etc/zypp/zypp.conf" << endl;
+          MIL << confpath << " not found, using defaults instead." << endl;
         }
         
         for ( IniDict::section_const_iterator sit = dict.sectionsBegin(); 
@@ -163,12 +167,26 @@
   //
   Arch ZConfig::systemArchitecture() const
   {
+    // get architecture from ZYpp() if not overriden,
+    //  ZYpp() knows how to retrieve the client arch and check cpu flags
     return ( (_pimpl->cfg_arch == Arch()) ?
         getZYpp()->architecture() : _pimpl->cfg_arch );
   }
 
   ///////////////////////////////////////////////////////////////////
   //
+  //   METHOD NAME : ZConfig::overrideSystemArchitecture
+  //   METHOD TYPE : void
+  //
+  void ZConfig::overrideSystemArchitecture(const Arch & arch)
+  {
+     WAR << "Overriding system architecture with " << arch << endl;
+     _pimpl->cfg_arch = arch;
+     getZYpp()->setArchitecture( arch );
+  }
+
+  ///////////////////////////////////////////////////////////////////
+  //
   //   METHOD NAME : ZConfig::defaultTextLocale
   //   METHOD TYPE : Locale
   //
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.18.4/zypp/ZConfig.h new/libzypp-3.18.4/zypp/ZConfig.h
--- old/libzypp-3.18.4/zypp/ZConfig.h   2007-08-26 16:26:52.000000000 +0200
+++ new/libzypp-3.18.4/zypp/ZConfig.h   2007-08-27 17:47:47.000000000 +0200
@@ -33,6 +33,9 @@
    * Use it to avoid hardcoded values and calls to getZYpp() just
    * to retrieve some value like architecture, languages or tmppath.
    *
+   * It reads /etc/zypp/zypp.conf, the filename can be overridden by
+   * setting the ZYPP_CONF environment variable to a different file.
+   *
    * \ingroup Singleton
   */
   class ZConfig : private base::NonCopyable
@@ -42,9 +45,15 @@
       static ZConfig & instance();
 
     public:
-      /** The system architecture. */
+      /** The zypp system architecture. */
       Arch systemArchitecture() const;
 
+      /** Override the zypp system architecture, useful for test scenarious.
+         This should be used for testing/debugging only since the Target backend
+         won't be able to install incompatible packages !!
+          DONT use for normal application unless you know what you're doing. */
+      void overrideSystemArchitecture( const Arch & );
+
       /** The prefered locale for translated labels, descriptions,
        *  descriptions, etc. passed to the UI.
        */



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



Remember to have fun...

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

< Previous Next >