commit libzypp for openSUSE:Factory
Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2014-04-17 14:43:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libzypp" Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2014-04-13 13:13:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2014-04-17 14:43:50.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 15 17:03:30 CEST 2014 - ma@suse.de + +- Factor out CommitPackageCache for standalone usage. (Fate#317077) +- version 14.17.5 (17) + +------------------------------------------------------------------- Old: ---- libzypp-14.17.4.tar.bz2 New: ---- libzypp-14.17.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.mbIeho/_old 2014-04-17 14:43:51.000000000 +0200 +++ /var/tmp/diff_new_pack.mbIeho/_new 2014-04-17 14:43:51.000000000 +0200 @@ -23,7 +23,7 @@ Summary: Package, Patch, Pattern, and Product Management License: GPL-2.0+ Group: System/Packages -Version: 14.17.4 +Version: 14.17.5 Release: 0 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc ++++++ libzypp-14.17.4.tar.bz2 -> libzypp-14.17.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/VERSION.cmake new/libzypp-14.17.5/VERSION.cmake --- old/libzypp-14.17.4/VERSION.cmake 2014-04-11 16:20:47.000000000 +0200 +++ new/libzypp-14.17.5/VERSION.cmake 2014-04-15 17:04:45.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "14") SET(LIBZYPP_COMPATMINOR "17") SET(LIBZYPP_MINOR "17") -SET(LIBZYPP_PATCH "4") +SET(LIBZYPP_PATCH "5") # -# LAST RELEASED: 14.17.4 (17) +# LAST RELEASED: 14.17.5 (17) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/package/libzypp.changes new/libzypp-14.17.5/package/libzypp.changes --- old/libzypp-14.17.4/package/libzypp.changes 2014-04-11 16:20:47.000000000 +0200 +++ new/libzypp-14.17.5/package/libzypp.changes 2014-04-15 17:04:45.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Apr 15 17:03:30 CEST 2014 - ma@suse.de + +- Factor out CommitPackageCache for standalone usage. (Fate#317077) +- version 14.17.5 (17) + +------------------------------------------------------------------- Fri Apr 11 16:16:11 CEST 2014 - ma@suse.de - history: log %posttrans errors and output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/CpeId.cc new/libzypp-14.17.5/zypp/CpeId.cc --- old/libzypp-14.17.4/zypp/CpeId.cc 2014-04-08 13:28:12.000000000 +0200 +++ new/libzypp-14.17.5/zypp/CpeId.cc 2014-04-15 18:04:44.000000000 +0200 @@ -9,6 +9,7 @@ /** \file zypp/CpeId.cc */ #include <iostream> +#include <array> #include "zypp/base/String.h" #include "zypp/base/LogTools.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/Repository.cc new/libzypp-14.17.5/zypp/Repository.cc --- old/libzypp-14.17.4/zypp/Repository.cc 2014-04-04 14:32:12.000000000 +0200 +++ new/libzypp-14.17.5/zypp/Repository.cc 2014-04-15 17:04:45.000000000 +0200 @@ -337,8 +337,8 @@ std::ostream & dumpAsXmlOn( std::ostream & str, const Repository & obj ) { return xmlout::node( str, "repository", { - { "alias", obj.name() }, - { "name", obj.alias() } + { "name", obj.name() }, + { "alias", obj.alias() } } ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/parser/xml/XmlEscape.h new/libzypp-14.17.5/zypp/parser/xml/XmlEscape.h --- old/libzypp-14.17.4/zypp/parser/xml/XmlEscape.h 2014-01-14 18:20:53.000000000 +0100 +++ new/libzypp-14.17.5/zypp/parser/xml/XmlEscape.h 2014-04-15 17:04:45.000000000 +0200 @@ -29,8 +29,10 @@ { EscapedString( const std::string & in_r ) : _in( in_r ) {} std::ostream & dumpOn( std::ostream & str ) const; - operator std::string() const + std::string asString() const { std::ostringstream str; dumpOn( str ); return str.str(); } + operator std::string() const + { return asString(); } private: const std::string & _in; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/target/CommitPackageCache.cc new/libzypp-14.17.5/zypp/target/CommitPackageCache.cc --- old/libzypp-14.17.4/zypp/target/CommitPackageCache.cc 2013-03-20 09:29:30.000000000 +0100 +++ new/libzypp-14.17.5/zypp/target/CommitPackageCache.cc 2014-04-15 17:04:45.000000000 +0200 @@ -19,6 +19,11 @@ using std::endl; +#include "zypp/target/rpm/librpmDb.h" +#include "zypp/repo/PackageProvider.h" +#include "zypp/repo/DeltaCandidates.h" +#include "zypp/ResPool.h" + /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// @@ -27,6 +32,71 @@ { ///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// + namespace { + /////////////////////////////////////////////////////////////////// + /// \class QueryInstalledEditionHelper + /// \short Helper for PackageProvider queries during download. + /////////////////////////////////////////////////////////////////// + struct QueryInstalledEditionHelper + { + bool operator()( const std::string & name_r, const Edition & ed_r, const Arch & arch_r ) const + { + rpm::librpmDb::db_const_iterator it; + for ( it.findByName( name_r ); *it; ++it ) + { + if ( arch_r == it->tag_arch() + && ( ed_r == Edition::noedition || ed_r == it->tag_edition() ) ) + { + return true; + } + } + return false; + } + }; + } // namespace + /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // + // class RepoProvidePackage + // + /////////////////////////////////////////////////////////////////// + + struct RepoProvidePackage::Impl + { + repo::RepoMediaAccess _access; + std::list<Repository> _repos; + repo::PackageProviderPolicy _packageProviderPolicy; + }; + + RepoProvidePackage::RepoProvidePackage() + : _impl( new Impl ) + { + const ResPool & pool( ResPool::instance() ); + _impl->_repos.insert( _impl->_repos.begin(), pool.knownRepositoriesBegin(), pool.knownRepositoriesEnd() ); + _impl->_packageProviderPolicy.queryInstalledCB( QueryInstalledEditionHelper() ); + } + + RepoProvidePackage::~RepoProvidePackage() + {} + + ManagedFile RepoProvidePackage::operator()( const PoolItem & pi, bool fromCache_r ) + { + Package::constPtr p = asKind<Package>(pi.resolvable()); + if ( fromCache_r ) + { + repo::PackageProvider pkgProvider( _impl->_access, p, repo::DeltaCandidates(), _impl->_packageProviderPolicy ); + return pkgProvider.providePackageFromCache(); + } + else + { + repo::DeltaCandidates deltas( _impl->_repos, p->name() ); + repo::PackageProvider pkgProvider( _impl->_access, p, deltas, _impl->_packageProviderPolicy ); + return pkgProvider.providePackage(); + } + } + + /////////////////////////////////////////////////////////////////// // // CLASS NAME : CommitPackageCache // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/target/CommitPackageCache.h new/libzypp-14.17.5/zypp/target/CommitPackageCache.h --- old/libzypp-14.17.4/zypp/target/CommitPackageCache.h 2014-01-24 08:44:53.000000000 +0100 +++ new/libzypp-14.17.5/zypp/target/CommitPackageCache.h 2014-04-15 17:04:45.000000000 +0200 @@ -29,6 +29,27 @@ { ///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// + /// \class RepoProvidePackage + /// \short Default PackageProvider for \ref CommitPackageCache + /// + /// \p pool_r \ref ResPool used to get candidates + /// \p pi item to be commited + /////////////////////////////////////////////////////////////////// + class RepoProvidePackage + { + public: + RepoProvidePackage(); + ~RepoProvidePackage(); + + /** Provide package optionally fron cache only. */ + ManagedFile operator()( const PoolItem & pi, bool fromCache_r ); + + private: + struct Impl; + RW_pointer<Impl> _impl; + }; + + /////////////////////////////////////////////////////////////////// // // CLASS NAME : CommitPackageCache // @@ -44,7 +65,7 @@ public: /** Ctor */ CommitPackageCache( const Pathname & rootDir_r, - const PackageProvider & packageProvider_r ); + const PackageProvider & packageProvider_r = RepoProvidePackage() ); /** Dtor */ ~CommitPackageCache(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.17.4/zypp/target/TargetImpl.cc new/libzypp-14.17.5/zypp/target/TargetImpl.cc --- old/libzypp-14.17.4/zypp/target/TargetImpl.cc 2014-04-04 14:47:40.000000000 +0200 +++ new/libzypp-14.17.5/zypp/target/TargetImpl.cc 2014-04-15 17:04:45.000000000 +0200 @@ -51,8 +51,6 @@ #include "zypp/solver/detail/Testcase.h" -#include "zypp/repo/DeltaCandidates.h" -#include "zypp/repo/PackageProvider.h" #include "zypp/repo/SrcPackageProvider.h" #include "zypp/sat/Pool.h" @@ -744,59 +742,6 @@ ZYppCommitResult & result_r ) { RunUpdateMessages( root_r, messagesPath_r, checkPackages_r, result_r ); } - /** Helper for PackageProvider queries during commit. */ - struct QueryInstalledEditionHelper - { - bool operator()( const std::string & name_r, - const Edition & ed_r, - const Arch & arch_r ) const - { - rpm::librpmDb::db_const_iterator it; - for ( it.findByName( name_r ); *it; ++it ) - { - if ( arch_r == it->tag_arch() - && ( ed_r == Edition::noedition || ed_r == it->tag_edition() ) ) - { - return true; - } - } - return false; - } - }; - - /** - * \short Let the Source provide the package. - * \p pool_r \ref ResPool used to get candidates - * \p pi item to be commited - */ - struct RepoProvidePackage - { - repo::RepoMediaAccess &_access; - std::list<Repository> _repos; - repo::PackageProviderPolicy _packageProviderPolicy; - - RepoProvidePackage( repo::RepoMediaAccess &access, ResPool pool_r ) - : _access(access), _repos( pool_r.knownRepositoriesBegin(), pool_r.knownRepositoriesEnd() ) - { - _packageProviderPolicy.queryInstalledCB( QueryInstalledEditionHelper() ); - } - - ManagedFile operator()( const PoolItem & pi, bool fromCache_r ) - { - Package::constPtr p = asKind<Package>(pi.resolvable()); - if ( fromCache_r ) - { - repo::PackageProvider pkgProvider( _access, p, repo::DeltaCandidates(), _packageProviderPolicy ); - return pkgProvider.providePackageFromCache(); - } - else - { - repo::DeltaCandidates deltas( _repos, p->name() ); - repo::PackageProvider pkgProvider( _access, p, deltas, _packageProviderPolicy ); - return pkgProvider.providePackage(); - } - } - }; /////////////////////////////////////////////////////////////////// IMPL_PTR_TYPE(TargetImpl); @@ -1356,9 +1301,7 @@ if ( ! policy_r.dryRun() || policy_r.downloadMode() == DownloadOnly ) { // Prepare the package cache. Pass all items requiring download. - repo::RepoMediaAccess access; - RepoProvidePackage repoProvidePackage( access, pool_r ); - CommitPackageCache packageCache( root(), repoProvidePackage ); + CommitPackageCache packageCache( root() ); packageCache.setCommitList( steps.begin(), steps.end() ); bool miss = false; -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de