Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2020-01-21 20:58:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Tue Jan 21 20:58:51 2020 rev:420 rq:765768 version:17.21.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2019-12-23 22:39:45.929880741 +0100 +++ /work/SRC/openSUSE:Factory/.libzypp.new.26092/libzypp.changes 2020-01-21 20:58:53.788807872 +0100 @@ -1,0 +2,8 @@ +Mon Jan 20 12:53:12 CET 2020 - [email protected] + +- Selectable: Fix highestAvailableVersionObj if only retracted + packages are available. Avoid using retracted items as candidate + (jira#SLE-8905) +- version 17.21.0 (20) + +------------------------------------------------------------------- Old: ---- libzypp-17.20.0.tar.bz2 New: ---- libzypp-17.21.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.kLjQka/_old 2020-01-21 20:58:55.704808765 +0100 +++ /var/tmp/diff_new_pack.kLjQka/_new 2020-01-21 20:58:55.708808767 +0100 @@ -1,7 +1,7 @@ # # spec file for package libzypp # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libzypp -Version: 17.20.0 +Version: 17.21.0 Release: 0 Url: https://github.com/openSUSE/libzypp Summary: Library for package, patch, pattern and product management ++++++ libzypp-17.20.0.tar.bz2 -> libzypp-17.21.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/VERSION.cmake new/libzypp-17.21.0/VERSION.cmake --- old/libzypp-17.20.0/VERSION.cmake 2019-12-19 13:36:31.000000000 +0100 +++ new/libzypp-17.21.0/VERSION.cmake 2020-01-20 12:56:18.000000000 +0100 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "20") -SET(LIBZYPP_MINOR "20") +SET(LIBZYPP_MINOR "21") SET(LIBZYPP_PATCH "0") # -# LAST RELEASED: 17.20.0 (20) +# LAST RELEASED: 17.21.0 (20) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/package/libzypp.changes new/libzypp-17.21.0/package/libzypp.changes --- old/libzypp-17.20.0/package/libzypp.changes 2019-12-19 13:36:31.000000000 +0100 +++ new/libzypp-17.21.0/package/libzypp.changes 2020-01-20 12:56:18.000000000 +0100 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Jan 20 12:53:12 CET 2020 - [email protected] + +- Selectable: Fix highestAvailableVersionObj if only retracted + packages are available. Avoid using retracted items as candidate + (jira#SLE-8905) +- version 17.21.0 (20) + +------------------------------------------------------------------- Thu Dec 19 13:28:00 CET 2019 - [email protected] - BuildRequires: libsolv-devel >= 0.7.10. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/po/fi.po new/libzypp-17.21.0/po/fi.po --- old/libzypp-17.20.0/po/fi.po 2019-12-05 14:41:26.000000000 +0100 +++ new/libzypp-17.21.0/po/fi.po 2020-01-13 21:01:10.000000000 +0100 @@ -20,7 +20,7 @@ "Project-Id-Version: zypp.fi\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-12-05 14:22+0100\n" -"PO-Revision-Date: 2019-04-09 16:45+0000\n" +"PO-Revision-Date: 2020-01-13 19:59+0000\n" "Last-Translator: Tommi Nieminen <[email protected]>\n" "Language-Team: Finnish <https://l10n.opensuse.org/projects/libzypp/master/fi/" ">\n" @@ -29,7 +29,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.3\n" +"X-Generator: Weblate 3.6.1\n" #. dubious: Throw on malformed known types, otherwise log a warning. #: zypp/CheckSum.cc:136 @@ -4812,19 +4812,19 @@ #: zypp/solver/detail/SATResolver.cc:1386 #, boost-format msgid "install %1% although it has been retracted" -msgstr "" +msgstr "asenna %1%, vaikka se on vedetty takaisin" #. translator: %1% is a package name #: zypp/solver/detail/SATResolver.cc:1389 #, boost-format msgid "allow to install the PTF %1%" -msgstr "" +msgstr "salli asentaa PTF %1%" #. translator: %1% is a package name #: zypp/solver/detail/SATResolver.cc:1392 #, boost-format msgid "install %1% although it is blacklisted" -msgstr "" +msgstr "asenna %1%, vaikka se on mustalistattu" #: zypp/solver/detail/SATResolver.cc:1412 #, c-format, boost-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/po/id.po new/libzypp-17.21.0/po/id.po --- old/libzypp-17.20.0/po/id.po 2019-12-05 14:41:26.000000000 +0100 +++ new/libzypp-17.21.0/po/id.po 2020-01-16 15:56:08.000000000 +0100 @@ -9,7 +9,7 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-12-05 14:22+0100\n" -"PO-Revision-Date: 2019-04-18 16:03+0000\n" +"PO-Revision-Date: 2020-01-16 14:53+0000\n" "Last-Translator: Kukuh Syafaat <[email protected]>\n" "Language-Team: Indonesian <https://l10n.opensuse.org/projects/libzypp/master/" "id/>\n" @@ -18,7 +18,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 3.3\n" +"X-Generator: Weblate 3.6.1\n" #. dubious: Throw on malformed known types, otherwise log a warning. #: zypp/CheckSum.cc:136 @@ -5047,19 +5047,19 @@ #: zypp/solver/detail/SATResolver.cc:1386 #, boost-format msgid "install %1% although it has been retracted" -msgstr "" +msgstr "pasang %1% meskipun telah ditarik kembali" #. translator: %1% is a package name #: zypp/solver/detail/SATResolver.cc:1389 #, boost-format msgid "allow to install the PTF %1%" -msgstr "" +msgstr "memungkinkan untuk memasang PTF %1%" #. translator: %1% is a package name #: zypp/solver/detail/SATResolver.cc:1392 #, boost-format msgid "install %1% although it is blacklisted" -msgstr "" +msgstr "pasang %1% meskipun masuk daftar hitam" #: zypp/solver/detail/SATResolver.cc:1412 #, c-format, boost-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/zypp/ui/Selectable.cc new/libzypp-17.21.0/zypp/ui/Selectable.cc --- old/libzypp-17.20.0/zypp/ui/Selectable.cc 2018-12-19 17:14:56.000000000 +0100 +++ new/libzypp-17.21.0/zypp/ui/Selectable.cc 2020-01-10 11:51:08.000000000 +0100 @@ -172,6 +172,12 @@ //////////////////////////////////////////////////////////////////////// + bool Selectable::hasRetracted() const + { return _pimpl->hasRetracted(); } + + bool Selectable::hasRetractedInstalled() const + { return _pimpl->hasRetractedInstalled(); } + bool Selectable::isUnmaintained() const { return _pimpl->isUnmaintained(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/zypp/ui/Selectable.h new/libzypp-17.21.0/zypp/ui/Selectable.h --- old/libzypp-17.20.0/zypp/ui/Selectable.h 2019-07-31 12:41:19.000000000 +0200 +++ new/libzypp-17.21.0/zypp/ui/Selectable.h 2020-01-10 11:51:08.000000000 +0100 @@ -125,6 +125,8 @@ /** The 'best' or 'most interesting' among all available objects. * One that is, or is likely to be, chosen for installation, unless * it violated any solver policy (see \ref updateCandidateObj). + * \note Might return a retracted item if explicitly set by \ref setCandidate + * or nothing else available. */ PoolItem candidateObj() const; @@ -132,6 +134,7 @@ * In contrary to \ref candidateObj, this may return no item even if * there are available objects. This simply means the \ref Repository * does not provide this object. + * \note Avoids to return retracted items. */ PoolItem candidateObjFrom( Repository repo_r ) const; @@ -140,6 +143,7 @@ * there are available objects. This simply means the best object is * already installed, and all available objects violate at least one * update policy. + * \note Avoids to return retracted items. */ PoolItem updateCandidateObj() const; @@ -147,6 +151,7 @@ * It's doubtful whether solely looking at the version makes a good * candidate, but apps ask for it. Beware that different vendors may * use different (uncomparable) version schemata. + * \note Avoids to return retracted items. */ PoolItem highestAvailableVersionObj() const; @@ -320,6 +325,12 @@ /** True if candidate object is present but no installed. */ bool hasCandidateObjOnly() const { return ( installedEmpty() ) && candidateObj(); } + + /** True if this Selectable contains a retracted item. */ + bool hasRetracted() const; + + /** True if this Selectable contains an installed retracted item. */ + bool hasRetractedInstalled() const; //@} /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/zypp/ui/SelectableImpl.h new/libzypp-17.21.0/zypp/ui/SelectableImpl.h --- old/libzypp-17.20.0/zypp/ui/SelectableImpl.h 2018-12-19 17:14:56.000000000 +0100 +++ new/libzypp-17.21.0/zypp/ui/SelectableImpl.h 2020-01-14 17:16:07.000000000 +0100 @@ -109,9 +109,9 @@ PoolItem candidateObj() const { PoolItem ret( transactingCandidate() ); - if ( ret ) - return ret; - return _candidate ? _candidate : defaultCandidate(); + if ( ! ret ) + ret = _candidate ? _candidate : defaultCandidate(); + return ret; } /** Set a userCandidate (out of available objects). @@ -129,6 +129,8 @@ { for ( const PoolItem & pi : available() ) { + if ( pi.isRetracted() ) + continue; if ( pi.repository() == repo_r ) return pi; } @@ -148,7 +150,10 @@ // multiversionInstall: This returns the candidate for the last // instance installed. Actually we'd need a list here. - if ( installedEmpty() || ! defaultCand ) + if ( ! defaultCand || defaultCand.isRetracted() ) + return PoolItem(); + + if ( installedEmpty() ) return defaultCand; // Here: installed and defaultCand are non NULL and it's not a // multiversion install. @@ -175,8 +180,15 @@ PoolItem highestAvailableVersionObj() const { PoolItem ret; + bool retractedOk = false; for ( const PoolItem & pi : available() ) { + if ( !retractedOk && pi.isRetracted() ) + { + if ( ret ) + break; // prefer a not retracted candidate + retractedOk = true; + } if ( !ret || pi.edition() > ret.edition() ) ret = pi; } @@ -298,6 +310,32 @@ //////////////////////////////////////////////////////////////////////// + bool hasRetracted() const + { return !_availableItems.empty() && _availableItems.rbegin()->isRetracted(); } + + bool hasRetractedInstalled() const + { + bool ret = false; + if ( hasRetracted() ) + { + for ( const PoolItem & ipi : installed() ) + { + PoolItem pi { identicalAvailableObj( ipi ) }; + if ( pi && pi.isRetracted() ) + { + ret = true; + break; + } + } + } + return ret; +// later if pool index is available: +// for ( const PoolItem & pi : installed() ) +// if ( pi.isRetracted() ) +// return true; +// return false; + } + bool isUnmaintained() const { return availableEmpty(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.20.0/zypp/ui/SelectableTraits.h new/libzypp-17.21.0/zypp/ui/SelectableTraits.h --- old/libzypp-17.20.0/zypp/ui/SelectableTraits.h 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.21.0/zypp/ui/SelectableTraits.h 2020-01-10 11:51:08.000000000 +0100 @@ -34,6 +34,7 @@ struct SelectableTraits { /** Oder on AvailableItemSet. + * \li not retracted * \li repository priority * \li best Arch (arch/noarch changes are ok) * \li best Edition @@ -49,6 +50,9 @@ // bool operator()( const PoolItem & lhs, const PoolItem & rhs ) const { + if ( lhs.isRetracted() != rhs.isRetracted() ) + return rhs.isRetracted(); + int lprio = lhs->satSolvable().repository().satInternalPriority(); int rprio = rhs->satSolvable().repository().satInternalPriority(); if ( lprio != rprio )
