Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2015-07-14 17:20:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-06-30 10:14:23.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2015-07-14 17:20:46.000000000 +0200 @@ -1,0 +2,24 @@ +Thu Jul 9 16:43:12 CEST 2015 - [email protected] + +- Resolver allow tuning DUP mode solver flags (FATE#319128) +- version 15.9.0 (5) + +------------------------------------------------------------------- +Fri Jul 3 08:23:04 CEST 2015 - [email protected] + +- Flags<Enum>: add stringify +- add asString for Patch::InteractiveFlag +- version 15.8.0 (5) + +------------------------------------------------------------------- +Thu Jul 2 01:13:24 CEST 2015 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed Jul 1 14:00:42 CEST 2015 - [email protected] + +- add asString for Patch::Category +- version 15.7.0 (5) + +------------------------------------------------------------------- Old: ---- libzypp-15.6.0.tar.bz2 New: ---- libzypp-15.9.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.TnpvAj/_old 2015-07-14 17:20:47.000000000 +0200 +++ /var/tmp/diff_new_pack.TnpvAj/_new 2015-07-14 17:20:47.000000000 +0200 @@ -19,7 +19,7 @@ %define force_gcc_46 0 Name: libzypp -Version: 15.6.0 +Version: 15.9.0 Release: 0 Url: git://gitorious.org/opensuse/libzypp.git Summary: Package, Patch, Pattern, and Product Management ++++++ libzypp-15.6.0.tar.bz2 -> libzypp-15.9.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/VERSION.cmake new/libzypp-15.9.0/VERSION.cmake --- old/libzypp-15.6.0/VERSION.cmake 2015-06-29 17:43:40.000000000 +0200 +++ new/libzypp-15.9.0/VERSION.cmake 2015-07-09 16:44:43.000000000 +0200 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "15") SET(LIBZYPP_COMPATMINOR "5") -SET(LIBZYPP_MINOR "6") +SET(LIBZYPP_MINOR "9") SET(LIBZYPP_PATCH "0") # -# LAST RELEASED: 15.6.0 (5) +# LAST RELEASED: 15.9.0 (5) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/package/libzypp.changes new/libzypp-15.9.0/package/libzypp.changes --- old/libzypp-15.6.0/package/libzypp.changes 2015-06-29 17:43:40.000000000 +0200 +++ new/libzypp-15.9.0/package/libzypp.changes 2015-07-09 16:44:43.000000000 +0200 @@ -1,4 +1,28 @@ ------------------------------------------------------------------- +Thu Jul 9 16:43:12 CEST 2015 - [email protected] + +- Resolver allow tuning DUP mode solver flags (FATE#319128) +- version 15.9.0 (5) + +------------------------------------------------------------------- +Fri Jul 3 08:23:04 CEST 2015 - [email protected] + +- Flags<Enum>: add stringify +- add asString for Patch::InteractiveFlag +- version 15.8.0 (5) + +------------------------------------------------------------------- +Thu Jul 2 01:13:24 CEST 2015 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed Jul 1 14:00:42 CEST 2015 - [email protected] + +- add asString for Patch::Category +- version 15.7.0 (5) + +------------------------------------------------------------------- Mon Jun 29 17:43:00 CEST 2015 - [email protected] - Fix lost pathname when importing repo keys (bnc#936373) Files old/libzypp-15.6.0/po/zypp-po.tar.bz2 and new/libzypp-15.9.0/po/zypp-po.tar.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/Patch.cc new/libzypp-15.9.0/zypp/Patch.cc --- old/libzypp-15.6.0/zypp/Patch.cc 2015-06-26 09:00:26.000000000 +0200 +++ new/libzypp-15.9.0/zypp/Patch.cc 2015-07-06 11:06:37.000000000 +0200 @@ -114,6 +114,21 @@ return CAT_OTHER; } + std::string asString( const Patch::Category & obj ) + { + switch ( obj ) + { + case Patch::CAT_OTHER: return std::string( "other" ); break; + case Patch::CAT_YAST: return std::string( "yast" ); break; + case Patch::CAT_SECURITY: return std::string( "security" ); break; + case Patch::CAT_RECOMMENDED: return std::string( "recommended" ); break; + case Patch::CAT_OPTIONAL: return std::string( "optional" ); break; + case Patch::CAT_DOCUMENT: return std::string( "document" ); break; + } + // make gcc happy: + return std::string( "other" ); + } + /////////////////////////////////////////////////////////////////// std::string Patch::severity() const @@ -187,8 +202,8 @@ } /////////////////////////////////////////////////////////////////// - - std::string Patch::message( const Locale & lang_r ) const + // +std::string Patch::message( const Locale & lang_r ) const { return lookupStrAttribute( sat::SolvAttr::message, lang_r ); } bool Patch::rebootSuggested() const @@ -241,6 +256,18 @@ return interactiveWhenIgnoring(); } + std::string asString( const Patch::InteractiveFlag & obj ) + { + switch ( obj ) + { + case Patch::NoFlags: return ""; break; + case Patch::Reboot: return "reboot"; break; + case Patch::Message: return "message"; break; + case Patch::License: return "license"; break; + } + return str::hexstring(obj); + } + Patch::Contents Patch::contents() const { Contents result; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/Patch.h new/libzypp-15.9.0/zypp/Patch.h --- old/libzypp-15.6.0/zypp/Patch.h 2015-06-29 12:40:00.000000000 +0200 +++ new/libzypp-15.9.0/zypp/Patch.h 2015-07-06 11:06:37.000000000 +0200 @@ -236,6 +236,12 @@ ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Patch::InteractiveFlags); ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Patch::SeverityFlags); + /** \relates Patch::Category string representation.*/ + std::string asString( const Patch::Category & obj ); + + /** \relates Patch::InteractiveFlag string representation.*/ + std::string asString( const Patch::InteractiveFlag & obj ); + /** \relates Patch::SeverityFlag string representation.*/ std::string asString( const Patch::SeverityFlag & obj ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/Resolver.cc new/libzypp-15.9.0/zypp/Resolver.cc --- old/libzypp-15.6.0/zypp/Resolver.cc 2014-07-01 11:30:28.000000000 +0200 +++ new/libzypp-15.9.0/zypp/Resolver.cc 2015-07-06 11:06:37.000000000 +0200 @@ -106,6 +106,22 @@ void Resolver::setDefaultCleandepsOnRemove() { _pimpl->setCleandepsOnRemove( indeterminate ); } bool Resolver::cleandepsOnRemove() const { return _pimpl->cleandepsOnRemove(); } +#define ZOLV_FLAG_BOOL( ZSETTER, ZGETTER ) \ + void Resolver::ZSETTER( bool yesno_r ){ _pimpl->ZSETTER( yesno_r ); } \ + bool Resolver::ZGETTER() const { return _pimpl->ZGETTER(); } \ + +#define ZOLV_FLAG_TRIBOOL( ZSETTER, ZDEFAULT, ZGETTER ) \ + ZOLV_FLAG_BOOL( ZSETTER , ZGETTER ) \ + void Resolver::ZDEFAULT() { _pimpl->ZSETTER( indeterminate ); } \ + + ZOLV_FLAG_TRIBOOL( dupSetAllowDowngrade, dupSetDefaultAllowDowngrade, dupAllowDowngrade ) + ZOLV_FLAG_TRIBOOL( dupSetAllowNameChange, dupSetDefaultAllowNameChange, dupAllowNameChange ) + ZOLV_FLAG_TRIBOOL( dupSetAllowArchChange, dupSetDefaultAllowArchChange, dupAllowArchChange ) + ZOLV_FLAG_TRIBOOL( dupSetAllowVendorChange, dupSetDefaultAllowVendorChange, dupAllowVendorChange ) + +#undef ZOLV_FLAG_BOOL +#undef ZOLV_FLAG_TRIBOOL + void Resolver::addUpgradeRepo( Repository repo_r ) { _pimpl->addUpgradeRepo( repo_r ); } bool Resolver::upgradingRepo( Repository repo_r ) const { return _pimpl->upgradingRepo( repo_r ); } void Resolver::removeUpgradeRepo( Repository repo_r ) { _pimpl->removeUpgradeRepo( repo_r ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/Resolver.h new/libzypp-15.9.0/zypp/Resolver.h --- old/libzypp-15.6.0/zypp/Resolver.h 2014-07-01 11:30:28.000000000 +0200 +++ new/libzypp-15.9.0/zypp/Resolver.h 2015-07-06 11:06:37.000000000 +0200 @@ -113,7 +113,7 @@ /** - * Do an distribution upgrade + * Do an distribution upgrade (DUP) * * Perform a distribution upgrade. This performs an update of * all packages with a special resolver algorithm which takes @@ -240,6 +240,32 @@ void setDefaultCleandepsOnRemove(); // set back to default (in zypp.conf) bool cleandepsOnRemove() const; + /** \name Solver flags for DUP mode. + * DUP mode default settings differ from 'ordinary' ones. Default for + * all DUP flags is \c true. + */ + //@{ + /** dup mode: allow to downgrade installed solvable */ + void dupSetAllowDowngrade( bool yesno_r ); + void dupSetDefaultAllowDowngrade(); // Set back to default + bool dupAllowDowngrade() const; + + /** dup mode: allow to change name of installed solvable */ + void dupSetAllowNameChange( bool yesno_r ); + void dupSetDefaultAllowNameChange(); // Set back to default + bool dupAllowNameChange() const; + + /** dup mode: allow to change architecture of installed solvables */ + void dupSetAllowArchChange( bool yesno_r ); + void dupSetDefaultAllowArchChange(); // Set back to default + bool dupAllowArchChange() const; + + /** dup mode: allow to change vendor of installed solvables*/ + void dupSetAllowVendorChange( bool yesno_r ); + void dupSetDefaultAllowVendorChange(); // Set back to default + bool dupAllowVendorChange() const; + //@} + /** \name Upgrade to content of a specific repository. * \note This is an ordinary solver request. You should simply * \ref resolvePool to execute, and not \ref doUpgrade. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/base/Flags.h new/libzypp-15.9.0/zypp/base/Flags.h --- old/libzypp-15.6.0/zypp/base/Flags.h 2015-06-26 09:00:26.000000000 +0200 +++ new/libzypp-15.9.0/zypp/base/Flags.h 2015-07-06 11:06:37.000000000 +0200 @@ -107,6 +107,47 @@ }; /////////////////////////////////////////////////////////////////// + /** \relates Flags Stringify + * Build a string of OR'ed names of each flag value set in \a flag_r. + * Remaining bits in \a flag_r are added as hexstring. + * \code + * enum E { a=1, b=2, c=4 }; + * ZYPP_DECLARE_FLAGS( E, MyFlags ); + * + * MyFlags f = a|b|c; + * cout << f << " = " << stringify( f, { {a,"A"}, {b,"B"} } ) << endl; + * // prints: 0x0007 = [A|B|0x4] + * \endcode + */ + template<typename Enum> + std::string stringify( const Flags<Enum> & flag_r, const std::initializer_list<std::pair<Flags<Enum>,std::string> > & flaglist_r = {}, + std::string intro_r = "[", std::string sep_r = "|", std::string extro_r = "]" ) + { + std::string ret( std::move(intro_r) ); + std::string sep; + + Flags<Enum> mask; + for ( const auto & pair : flaglist_r ) + { + if ( flag_r.testFlag( pair.first ) ) + { + mask |= pair.first; + ret += sep; + ret += pair.second; + if ( sep.empty() && !sep_r.empty() ) + { sep = std::move(sep_r); } + } + } + mask = flag_r & ~mask; + if ( mask ) + { + ret += sep; + ret += str::hexstring( mask, 0 ); + } + ret += std::move(extro_r); + return ret; + } + template<typename Enum> inline std::ostream & operator<<( std::ostream & str, const Flags<Enum> & obj ) { return str << str::hexstring(obj); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/solver/detail/Resolver.cc new/libzypp-15.9.0/zypp/solver/detail/Resolver.cc --- old/libzypp-15.6.0/zypp/solver/detail/Resolver.cc 2014-07-01 11:30:28.000000000 +0200 +++ new/libzypp-15.9.0/zypp/solver/detail/Resolver.cc 2015-07-06 11:06:37.000000000 +0200 @@ -104,6 +104,20 @@ } //--------------------------------------------------------------------------- +// forward flags too SATResolver +#define ZOLV_FLAG_TRIBOOL( ZSETTER, ZGETTER, ZVARNAME, ZVARDEFAULT ) \ + void Resolver::ZSETTER( TriBool state_r ) \ + { _satResolver->ZVARNAME = indeterminate(state_r) ? ZVARDEFAULT : bool(state_r); } \ + bool Resolver::ZGETTER() const \ + { return _satResolver->ZVARNAME; } \ + +ZOLV_FLAG_TRIBOOL( dupSetAllowDowngrade, dupAllowDowngrade, _dup_allowdowngrade, true ) +ZOLV_FLAG_TRIBOOL( dupSetAllowNameChange, dupAllowNameChange, _dup_allownamechange, true ) +ZOLV_FLAG_TRIBOOL( dupSetAllowArchChange, dupAllowArchChange, _dup_allowarchchange, true ) +ZOLV_FLAG_TRIBOOL( dupSetAllowVendorChange, dupAllowVendorChange, _dup_allowvendorchange, true ) + +#undef ZOLV_FLAG_TRIBOOL +//--------------------------------------------------------------------------- void Resolver::setAllowVendorChange( TriBool state_r ) { @@ -255,7 +269,6 @@ //---------------------------------------------------------------------------- // undo - void Resolver::undo() { UndoTransact info(ResStatus::APPL_LOW); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/solver/detail/Resolver.h new/libzypp-15.9.0/zypp/solver/detail/Resolver.h --- old/libzypp-15.6.0/zypp/solver/detail/Resolver.h 2014-07-01 11:30:28.000000000 +0200 +++ new/libzypp-15.9.0/zypp/solver/detail/Resolver.h 2015-07-06 11:06:37.000000000 +0200 @@ -223,6 +223,17 @@ void setCleandepsOnRemove( TriBool state_r ); //@} +#define ZOLV_FLAG_TRIBOOL( ZSETTER, ZGETTER ) \ + void ZSETTER( TriBool state_r ); \ + bool ZGETTER() const; \ + + ZOLV_FLAG_TRIBOOL( dupSetAllowDowngrade, dupAllowDowngrade ) + ZOLV_FLAG_TRIBOOL( dupSetAllowNameChange, dupAllowNameChange ) + ZOLV_FLAG_TRIBOOL( dupSetAllowArchChange, dupAllowArchChange ) + ZOLV_FLAG_TRIBOOL( dupSetAllowVendorChange, dupAllowVendorChange ) + +#undef ZOLV_FLAG_TRIBOOL + ResolverProblemList problems() const; void applySolutions( const ProblemSolutionList & solutions ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/solver/detail/SATResolver.cc new/libzypp-15.9.0/zypp/solver/detail/SATResolver.cc --- old/libzypp-15.6.0/zypp/solver/detail/SATResolver.cc 2015-04-01 14:01:15.000000000 +0200 +++ new/libzypp-15.9.0/zypp/solver/detail/SATResolver.cc 2015-07-06 11:06:37.000000000 +0200 @@ -176,6 +176,10 @@ , _allowarchchange(false) , _allowvendorchange(ZConfig::instance().solver_allowVendorChange()) , _allowuninstall(false) + , _dup_allowdowngrade( true ) + , _dup_allownamechange( true ) + , _dup_allowarchchange( true ) + , _dup_allowvendorchange( true ) , _updatesystem(false) , _noupdateprovide(false) , _dosplitprovides(true) @@ -480,14 +484,18 @@ solver_set_flag(_solv, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides); solver_set_flag(_solv, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide); solver_set_flag(_solv, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires); - + solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_DOWNGRADE, _dup_allowdowngrade ); + solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, _dup_allownamechange ); + solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE, _dup_allowarchchange ); + solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, _dup_allowvendorchange ); +#if 1 #define HACKENV(X,D) solver_set_flag(_solv, X, env::HACKENV( #X, D ) ); - HACKENV( SOLVER_FLAG_DUP_ALLOW_DOWNGRADE, true ); - HACKENV( SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, true ); - HACKENV( SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE,true ); - HACKENV( SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, true ); + HACKENV( SOLVER_FLAG_DUP_ALLOW_DOWNGRADE, _dup_allowdowngrade ); + HACKENV( SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, _dup_allownamechange ); + HACKENV( SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE,_dup_allowarchchange ); + HACKENV( SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, _dup_allowvendorchange ); #undef HACKENV - +#endif sat::Pool::instance().prepareForSolving(); // Solve ! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.6.0/zypp/solver/detail/SATResolver.h new/libzypp-15.9.0/zypp/solver/detail/SATResolver.h --- old/libzypp-15.6.0/zypp/solver/detail/SATResolver.h 2014-07-01 11:30:28.000000000 +0200 +++ new/libzypp-15.9.0/zypp/solver/detail/SATResolver.h 2015-07-06 11:06:37.000000000 +0200 @@ -88,22 +88,27 @@ // solve results PoolItemList _result_items_to_install; PoolItemList _result_items_to_remove; + public: + bool _fixsystem:1; // repair errors in rpm dependency graph + bool _allowdowngrade:1; // allow to downgrade installed solvable + bool _allowarchchange:1; // allow to change architecture of installed solvables + bool _allowvendorchange:1; // allow to change vendor of installed solvables + bool _allowuninstall:1; // allow removal of installed solvables + bool _updatesystem:1; // update + bool _noupdateprovide:1; // true: update packages needs not to provide old package + bool _dosplitprovides:1; // true: consider legacy split provides + bool _onlyRequires:1; // true: consider required packages only + bool _ignorealreadyrecommended:1; // true: ignore recommended packages that were already recommended by the installed packages + bool _distupgrade:1; + bool _distupgrade_removeunsupported:1; + bool _dup_allowdowngrade:1; // dup mode: allow to downgrade installed solvable + bool _dup_allownamechange:1; // dup mode: allow to change name of installed solvable + bool _dup_allowarchchange:1; // dup mode: allow to change architecture of installed solvables + bool _dup_allowvendorchange:1; // dup mode: allow to change vendor of installed solvables + bool _solveSrcPackages:1; // false: generate no job rule for source packages selected in the pool + bool _cleandepsOnRemove:1; // whether removing a package should also remove no longer needed requirements - bool _fixsystem; // repair errors in rpm dependency graph - bool _allowdowngrade; // allow to downgrade installed solvable - bool _allowarchchange; // allow to change architecture of installed solvables - bool _allowvendorchange; // allow to change vendor of installed solvables - bool _allowuninstall; // allow removal of installed solvables - bool _updatesystem; // update - bool _noupdateprovide; // true: update packages needs not to provide old package - bool _dosplitprovides; // true: consider legacy split provides - bool _onlyRequires; // true: consider required packages only - bool _ignorealreadyrecommended; // true: ignore recommended packages that were already recommended by the installed packages - bool _distupgrade; - bool _distupgrade_removeunsupported; - bool _solveSrcPackages; // false: generate no job rule for source packages selected in the pool - bool _cleandepsOnRemove; // whether removing a package should also remove no longer needed requirements - + private: // ---------------------------------- methods std::string SATprobleminfoString (Id problem, std::string &detail, Id &ignoreId); void resetItemTransaction (PoolItem item);
