Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2018-12-19 13:48:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Wed Dec 19 13:48:46 2018 rev:409 rq:659302 version:17.10.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2018-12-03 10:09:00.551785474 +0100 +++ /work/SRC/openSUSE:Factory/.libzypp.new.28833/libzypp.changes 2018-12-19 13:49:04.539313224 +0100 @@ -1,0 +2,17 @@ +Tue Dec 18 14:01:19 CET 2018 - [email protected] + +- Simplify complex locks so zypper can display them (bsc#1112911) +- version 17.10.3 (9) + +------------------------------------------------------------------- +Mon Dec 10 16:57:34 CET 2018 - [email protected] + +- commit: set `SYSTEMD_OFFLINE=1` during chrooted commits (bsc#1118758) +- no-recommends: Nevertheless consider resolver namespaces (hardware, + language,..supporting packages) (FATE#325513) +- BuildRequires: libsolv-devel >= 0.7.2 + (SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED) +- Remove world-readable bit from /var/log/zypp (bsc#1099019) +- version 17.10.2 (9) + +------------------------------------------------------------------- Old: ---- libzypp-17.10.1.tar.bz2 New: ---- libzypp-17.10.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.toRVeL/_old 2018-12-19 13:49:05.467311935 +0100 +++ /var/tmp/diff_new_pack.toRVeL/_new 2018-12-19 13:49:05.467311935 +0100 @@ -17,7 +17,7 @@ Name: libzypp -Version: 17.10.1 +Version: 17.10.3 Release: 0 Url: https://github.com/openSUSE/libzypp Summary: Library for package, patch, pattern and product management @@ -75,7 +75,7 @@ BuildRequires: pkg-config %endif -BuildRequires: libsolv-devel >= 0.7.1 +BuildRequires: libsolv-devel >= 0.7.2 %if 0%{?suse_version} >= 1100 BuildRequires: libsolv-tools %requires_eq libsolv-tools @@ -363,7 +363,7 @@ %config(noreplace) %{_sysconfdir}/zypp/systemCheck %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr %dir %{_var}/lib/zypp -%dir %{_var}/log/zypp +%dir %attr(750,root,root) %{_var}/log/zypp %dir %{_var}/cache/zypp %{_prefix}/lib/zypp %{_datadir}/zypp ++++++ libzypp-17.10.1.tar.bz2 -> libzypp-17.10.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/VERSION.cmake new/libzypp-17.10.3/VERSION.cmake --- old/libzypp-17.10.1/VERSION.cmake 2018-11-28 14:46:29.000000000 +0100 +++ new/libzypp-17.10.3/VERSION.cmake 2018-12-18 14:02:11.000000000 +0100 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "9") SET(LIBZYPP_MINOR "10") -SET(LIBZYPP_PATCH "1") +SET(LIBZYPP_PATCH "3") # -# LAST RELEASED: 17.10.1 (9) +# LAST RELEASED: 17.10.3 (9) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/libzypp.spec.cmake new/libzypp-17.10.3/libzypp.spec.cmake --- old/libzypp-17.10.1/libzypp.spec.cmake 2018-11-20 12:39:44.000000000 +0100 +++ new/libzypp-17.10.3/libzypp.spec.cmake 2018-12-10 16:06:58.000000000 +0100 @@ -75,7 +75,7 @@ BuildRequires: pkg-config %endif -BuildRequires: libsolv-devel >= 0.7.1 +BuildRequires: libsolv-devel >= 0.7.2 %if 0%{?suse_version} >= 1100 BuildRequires: libsolv-tools %requires_eq libsolv-tools @@ -363,7 +363,7 @@ %config(noreplace) %{_sysconfdir}/zypp/systemCheck %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr %dir %{_var}/lib/zypp -%dir %{_var}/log/zypp +%dir %attr(750,root,root) %{_var}/log/zypp %dir %{_var}/cache/zypp %{_prefix}/lib/zypp %{_datadir}/zypp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/package/libzypp.changes new/libzypp-17.10.3/package/libzypp.changes --- old/libzypp-17.10.1/package/libzypp.changes 2018-11-28 14:46:29.000000000 +0100 +++ new/libzypp-17.10.3/package/libzypp.changes 2018-12-18 14:02:11.000000000 +0100 @@ -1,4 +1,21 @@ ------------------------------------------------------------------- +Tue Dec 18 14:01:19 CET 2018 - [email protected] + +- Simplify complex locks so zypper can display them (bsc#1112911) +- version 17.10.3 (9) + +------------------------------------------------------------------- +Mon Dec 10 16:57:34 CET 2018 - [email protected] + +- commit: set `SYSTEMD_OFFLINE=1` during chrooted commits (bsc#1118758) +- no-recommends: Nevertheless consider resolver namespaces (hardware, + language,..supporting packages) (FATE#325513) +- BuildRequires: libsolv-devel >= 0.7.2 + (SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED) +- Remove world-readable bit from /var/log/zypp (bsc#1099019) +- version 17.10.2 (9) + +------------------------------------------------------------------- Wed Nov 28 14:40:26 CET 2018 - [email protected] - Adapt to changes in upcoming Boost 1.69.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/solver-system.xml new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/solver-system.xml --- old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/solver-system.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/solver-system.xml 2018-12-10 16:06:58.000000000 +0100 @@ -0,0 +1,45 @@ +<channel><subchannel> + +<package> + <name>aspell</name> + <history> + <update> + <arch>x86_64</arch> + <version>0</version><release>0</release> + </update> + </history> + <recommends> + <dep name='aspell-en' /> + <dep name='recommended-pkg' /> + </recommends> +</package> + +<package> + <name>aspell-en</name> + <history> + <update> + <arch>x86_64</arch> + <version>0</version><release>0</release> + </update> + </history> + <provides> + <dep name='locale(aspell:en)' /> + </provides> + <supplements> + <!--- ignoring '(aspell and namespace:language(en))' --> + </supplements> +</package> + +<package> + <name>glibc</name> + <history> + <update> + <arch>x86_64</arch> + <version>0</version><release>0</release> + </update> + </history> + <provides> + <dep name='glibc' op='==' version='0' release='0' /> + </provides> +</package> +</subchannel></channel> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/solver-test.xml new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/solver-test.xml --- old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/solver-test.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/solver-test.xml 2018-12-10 16:06:58.000000000 +0100 @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<test> +<setup arch="x86_64"> + <system file="solver-system.xml"/> + <!-- + - alias : update + - url : http://foo.org/distribution/update + --> + <channel file="update.xml" name="update"/> + <locale name="en_US" /> + <locale name="de" /> +</setup> +</test> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/update.xml new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/update.xml --- old/libzypp-17.10.1/tests/data/TCNamespaceRecommends/update.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/libzypp-17.10.3/tests/data/TCNamespaceRecommends/update.xml 2018-12-10 16:06:58.000000000 +0100 @@ -0,0 +1,75 @@ +<channel><subchannel> + +<package> + <name>aspell</name> + <history> + <update> + <arch>x86_64</arch> + <version>1</version><release>1</release> + </update> + </history> + <recommends> + <dep name='aspell-en' /> + <dep name='recommended-pkg' /> + </recommends> +</package> + +<package> + <name>aspell-en</name> + <history> + <update> + <arch>x86_64</arch> + <version>1</version><release>1</release> + </update> + </history> + <provides> + <dep name='locale(aspell:en)' /> + </provides> + <supplements> + <!--- ignoring '(aspell and namespace:language(en))' --> + </supplements> +</package> + +<package> + <name>aspell-de</name> + <history> + <update> + <arch>x86_64</arch> + <version>1</version><release>1</release> + </update> + </history> + <provides> + <dep name='locale(aspell:de)' /> + </provides> + <supplements> + <!--- ignoring '(aspell and namespace:language(de))' --> + </supplements> +</package> + +<package> + <name>aspell-fr</name> + <history> + <update> + <arch>x86_64</arch> + <version>1</version><release>1</release> + </update> + </history> + <provides> + <dep name='locale(aspell:fr)' /> + </provides> + <supplements> + <!--- ignoring '(aspell and namespace:language(de))' --> + </supplements> +</package> + +<package> + <name>recommended-pkg</name> + <history> + <update> + <arch>x86_64</arch> + <version>1</version><release>1</release> + </update> + </history> +</package> + +</subchannel></channel> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/zypp/CMakeLists.txt new/libzypp-17.10.3/tests/zypp/CMakeLists.txt --- old/libzypp-17.10.1/tests/zypp/CMakeLists.txt 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/tests/zypp/CMakeLists.txt 2018-12-10 16:06:58.000000000 +0100 @@ -39,6 +39,7 @@ RepoManager RepoStatus ResKind + Resolver ResStatus Selectable SetRelationMixin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/zypp/PoolQuery_test.cc new/libzypp-17.10.3/tests/zypp/PoolQuery_test.cc --- old/libzypp-17.10.1/tests/zypp/PoolQuery_test.cc 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/tests/zypp/PoolQuery_test.cc 2018-12-18 11:52:47.000000000 +0100 @@ -870,4 +870,116 @@ } } +namespace +{ + std::string q2str( const PoolQuery & q_r ) + { + str::Str s; + q_r.serialize( s.stream() ); + return s; + } + + template <class OutputIterator> + void str2q( const std::string & s_r, OutputIterator out_r ) + { + std::istringstream s( s_r ); + do { + PoolQuery q; + if ( q.recover( s ) ) + *out_r++ = std::move(q); + else + break; + } while ( true ); + } + + typedef std::set<PoolQuery> Pqs; + + PoolQuery str2q( const std::string & s_r ) + { + Pqs ret; + str2q( s_r, std::insert_iterator<Pqs>( ret, ret.end() ) ); + return *ret.begin(); + } + + + std::string serialized( const std::string & arg_r ) + { return "\n" + arg_r + "\n\n"; } + + template <typename... Args> + std::string serialized( const std::string & arg_r, Args... args_r ) + { return "\n" + arg_r + serialized( args_r... ); } + + + void testSerializeAndBack( const PoolQuery & q_r, const PoolQuery & expect_r, bool equal_r = true ) + { + static unsigned i = 0; + + std::string s { q2str( q_r ) }; + PoolQuery q { str2q( s ) }; + BOOST_CHECK_EQUAL( (q == expect_r), equal_r ); + if ( ++i && (q == expect_r) != equal_r ) + { + cout << "+++" << endl; + cout << q << endl; + cout << "=== " << i << " ^v SerializeAndBack == " << equal_r << endl; + cout << expect_r << endl; + cout << "---" << endl; + } + } +} + +BOOST_AUTO_TEST_CASE(zypperLocksSerialize) +{ + // Fix/cleanup zypper locks (old style, new stule, complex) (bsc#1112911) + // As you may notice: locks (by now) ignore any arch component + cout << "****zypperLocksSerialize****" << endl; + std::string n { "n*" }; + Rel o { Rel::EQ }; + Edition e { "v", "r", 1 }; + Arch a { "a" }; + + { + // old style + // solvable_name: n* + PoolQuery oldq; + oldq.addAttribute( sat::SolvAttr::name, n ); + testSerializeAndBack( oldq, oldq ); + + { // new style + PoolQuery q; + q.addDependency( sat::SolvAttr::name, n, Rel::ANY, Edition(), Arch_empty ); + testSerializeAndBack( q, oldq ); + } + + { // new style + arch rule however stays complex + PoolQuery q; + q.addDependency( sat::SolvAttr::name, n, Rel::ANY, Edition(), a ); + testSerializeAndBack( q, oldq, false ); + testSerializeAndBack( q, q ); + } + } + + { + // old style + // solvable_name: n* + // version: == 1:v-r + PoolQuery oldq; + oldq.addAttribute( sat::SolvAttr::name, n ); + oldq.setEdition( e, o ); + testSerializeAndBack( oldq, oldq ); + + { // new style + PoolQuery q; + q.addDependency( sat::SolvAttr::name, n, o, e, Arch_empty ); + testSerializeAndBack( q, oldq ); + } + + { // new style + arch rule however stays complex + PoolQuery q; + q.addDependency( sat::SolvAttr::name, n, o, e, a ); + testSerializeAndBack( q, oldq, false ); + testSerializeAndBack( q, q ); + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/tests/zypp/Resolver_test.cc new/libzypp-17.10.3/tests/zypp/Resolver_test.cc --- old/libzypp-17.10.1/tests/zypp/Resolver_test.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/libzypp-17.10.3/tests/zypp/Resolver_test.cc 2018-12-10 16:06:58.000000000 +0100 @@ -0,0 +1,95 @@ +#include <boost/test/auto_unit_test.hpp> +#define BOOST_CHECK_MODULE Resolver +using namespace boost::unit_test; + +#include "TestSetup.h" +#include "zypp/ResPool.h" +#include "zypp/ResPoolProxy.h" +#include "zypp/pool/PoolStats.h" +#include "zypp/ui/Selectable.h" + +static TestSetup test; + +struct BAD_TESTCASE {}; + +typedef std::set<PoolItem> PoolItemSet; + +constexpr const unsigned onlyRequires = 0x1; +constexpr const unsigned inrMode = 0x2; + +PoolItemSet resolve( unsigned flags_r = 0 ) +{ + test.resolver().setOnlyRequires ( flags_r & onlyRequires ); + test.resolver().setIgnoreAlreadyRecommended( ! ( flags_r & inrMode ) ); + if ( ! test.resolver().resolvePool() ) + throw BAD_TESTCASE(); + + return { make_filter_begin<resfilter::ByTransact>(test.pool()), make_filter_end<resfilter::ByTransact>(test.pool()) }; +} + +inline PoolItem getPi( const std::string & name_r, bool installed_r ) +{ + for ( const auto & pi : test.pool().byName( name_r ) ) + { if ( pi.isSystem() == installed_r ) return pi; } + throw BAD_TESTCASE(); +} +inline PoolItem getIPi( const std::string & name_r ) +{ return getPi( name_r, true ); } +inline PoolItem getAPi( const std::string & name_r ) +{ return getPi( name_r, false ); } + +///////////////////////////////////////////////////////////////////////////// +// Pool content: +PoolItem Ip; // IA: aspell +PoolItem Ap; +PoolItem Ipen; // IA: aspell-en (wanted locale) +PoolItem Apen; +PoolItem Apde; // A: aspell-de (wanted locale) +PoolItem Apfr; // A: aspell-fr (unwanted locale) +PoolItem Aprec; // A: recommended-pkg (by aspell) + +BOOST_AUTO_TEST_CASE(testcase_init) +{ + test.loadTestcaseRepos( TESTS_SRC_DIR"/data/TCNamespaceRecommends" ); + Ip = getIPi( "aspell" ); + Ap = getAPi( "aspell" ); + Ipen = getIPi( "aspell-en" ); + Apen = getAPi( "aspell-en" ); + Apde = getAPi( "aspell-de" ); + Apfr = getAPi( "aspell-fr" ); + Aprec = getAPi( "recommended-pkg" ); +} + +///////////////////////////////////////////////////////////////////////////// + +inline void BOOST_checkresult( const PoolItemSet & resolved_r, const PoolItemSet & expected_r ) +{ BOOST_CHECK_EQUAL( resolved_r, expected_r ); } + + +BOOST_AUTO_TEST_CASE(install) +{ + Ap.status().setTransact( true, ResStatus::USER ); + // Upadte aspell, add all recommends + BOOST_checkresult( resolve(), { Ap, Ip, Apde, Aprec } ); + Ap.status().setTransact( false, ResStatus::USER ); +} + +BOOST_AUTO_TEST_CASE(installOnlyRequires) +{ + Ap.status().setTransact( true, ResStatus::USER ); + // Upadte aspell, add only namespace recommends + BOOST_checkresult( resolve( onlyRequires ), { Ap, Ip, Apde } ); + Ap.status().setTransact( false, ResStatus::USER ); +} + +BOOST_AUTO_TEST_CASE(inr) +{ + // Fillup all recommends + BOOST_checkresult( resolve( inrMode ), { Apde, Aprec } ); +} + +BOOST_AUTO_TEST_CASE(inrOnlyRequires) +{ + // Fillup only namespace recommends + BOOST_checkresult( resolve( inrMode|onlyRequires ), { Apde } ); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/CMakeLists.txt new/libzypp-17.10.3/zypp/CMakeLists.txt --- old/libzypp-17.10.1/zypp/CMakeLists.txt 2018-11-19 16:01:31.000000000 +0100 +++ new/libzypp-17.10.3/zypp/CMakeLists.txt 2018-12-10 16:41:40.000000000 +0100 @@ -235,6 +235,7 @@ base/DrunkenBishop.h base/SerialNumber.h base/Easy.h + base/Env.h base/Errno.h base/Random.h base/Algorithm.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/PoolQuery.cc new/libzypp-17.10.3/zypp/PoolQuery.cc --- old/libzypp-17.10.1/zypp/PoolQuery.cc 2018-10-02 10:58:51.000000000 +0200 +++ new/libzypp-17.10.3/zypp/PoolQuery.cc 2018-12-18 11:52:47.000000000 +0100 @@ -1302,6 +1302,70 @@ } while ( true ); + // OLD STYLE VERSIONED LOCKS: + // solvable_name: kernel + // version: > 1 + // + // NEW STYLE VERSIONED LOCKS: + // complex: AttrMatchData solvable:name kernel C SolvableRange\ >\ 1\ \"\" + // or + // solvable_name: kernel > 1 + // + // Semantically equivalent as locks, but due to the different syntax + // the complex lock is wrongly handled by zypper. + // + // bsc#1112911: Unfortunately all styles are found in real-life locks-files. + // libzypp will try to make sure, when parsing the locks-file, that complex + // locks are rewritten into to OLD STYLE queries zypper can handle. + if ( !_pimpl->_attrs.count(SolvAttr::name) && _pimpl->_uncompiledPredicated.size() == 1 ) + { + // No OLD STYLE lock for SolvAttr::name and exactly one complex lock... + const AttrMatchData & attrmatch { *_pimpl->_uncompiledPredicated.begin() }; + if ( attrmatch.attr == SolvAttr::name && attrmatch.strMatcher.flags().mode() == Match::OTHER ) + { + // ...for SolvAttr::name and following the global search flags. + // A candidate for a rewrite? + + std::vector<std::string> words; + str::splitEscaped( attrmatch.predicateStr, std::back_inserter(words) ); + if ( words.size() < 4 || words[3].empty() ) + { + // We have _NO_ arch rule in the complex predicate, so we can simplify it. + // + // NOTE: AFAIK it's not possible to create (or have created) a complex lock + // with arch rule with zypper means. Nevertheless, in case such a rule made it + // into a locks file, it's better to have a strange looking 'zypper locks' list + // than to lock the wrong packages. + // (and remember that you can't use "addAttribute( SolvAttr::arch, ... )" because + // attributes are `OR`ed) + + // kind + if ( attrmatch.kindPredicate ) + { + _pimpl->_kinds.clear(); // an explicit kind overwrites any global one + addKind( attrmatch.kindPredicate ); + } + + // name + addAttribute( SolvAttr::name, attrmatch.strMatcher.searchstring() ); + + // edition + std::vector<std::string> words; + str::splitEscaped( attrmatch.predicateStr, std::back_inserter(words) ); + if ( ! words.empty() ) + { + if ( words[0] == "EditionRange" || words[0] == "SolvableRange" ) + { + setEdition( Edition(words[2]), Rel(words[1]) ); + } + } + + // finally remove the complex lock + _pimpl->_uncompiledPredicated.clear(); + } + } + } + return finded_something; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/RepoInfo.cc new/libzypp-17.10.3/zypp/RepoInfo.cc --- old/libzypp-17.10.1/zypp/RepoInfo.cc 2018-10-12 16:35:39.000000000 +0200 +++ new/libzypp-17.10.3/zypp/RepoInfo.cc 2018-11-29 11:26:23.000000000 +0100 @@ -387,11 +387,11 @@ bool RepoInfo::repoGpgCheck() const - { return gpgCheck() || _pimpl->cfgRepoGpgCheck(); } + { return gpgCheck() || bool(_pimpl->cfgRepoGpgCheck()); } bool RepoInfo::repoGpgCheckIsMandatory() const { - bool ret = ( gpgCheck() && indeterminate(_pimpl->cfgRepoGpgCheck()) ) || _pimpl->cfgRepoGpgCheck(); + bool ret = ( gpgCheck() && indeterminate(_pimpl->cfgRepoGpgCheck()) ) || bool(_pimpl->cfgRepoGpgCheck()); if ( ret && _pimpl->internalUnsignedConfirmed() ) // relax if unsigned repo was confirmed in the past ret = false; return ret; @@ -402,10 +402,10 @@ bool RepoInfo::pkgGpgCheck() const - { return _pimpl->cfgPkgGpgCheck() || ( gpgCheck() && !bool(validRepoSignature())/*enforced*/ ) ; } + { return bool(_pimpl->cfgPkgGpgCheck()) || ( gpgCheck() && !bool(validRepoSignature())/*enforced*/ ) ; } bool RepoInfo::pkgGpgCheckIsMandatory() const - { return _pimpl->cfgPkgGpgCheck() || ( gpgCheck() && indeterminate(_pimpl->cfgPkgGpgCheck()) && !bool(validRepoSignature())/*enforced*/ ); } + { return bool(_pimpl->cfgPkgGpgCheck()) || ( gpgCheck() && indeterminate(_pimpl->cfgPkgGpgCheck()) && !bool(validRepoSignature())/*enforced*/ ); } void RepoInfo::setPkgGpgCheck( TriBool value_r ) { _pimpl->rawPkgGpgCheck( value_r ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/RepoManager.cc new/libzypp-17.10.3/zypp/RepoManager.cc --- old/libzypp-17.10.1/zypp/RepoManager.cc 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/zypp/RepoManager.cc 2018-11-29 11:26:23.000000000 +0100 @@ -2243,7 +2243,7 @@ // Make sure the service repo is created with the appropriate enablement if ( ! indeterminate(toBeEnabled) ) - it->setEnabled( toBeEnabled ); + it->setEnabled( ( bool ) toBeEnabled ); DBG << "Service adds repo " << it->alias() << " " << (it->enabled()?"enabled":"disabled") << endl; addRepository( *it ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/Resolver.cc new/libzypp-17.10.3/zypp/Resolver.cc --- old/libzypp-17.10.1/zypp/Resolver.cc 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/Resolver.cc 2018-12-10 16:06:59.000000000 +0100 @@ -86,10 +86,6 @@ void Resolver::setIgnoreAlreadyRecommended( bool yesno_r) { _pimpl->setIgnoreAlreadyRecommended( yesno_r ); } bool Resolver::ignoreAlreadyRecommended() const { return _pimpl->ignoreAlreadyRecommended(); } - void Resolver::setInr( ResolverNamespaces namespaces_r ) { _pimpl->setInr( namespaces_r ); } - void Resolver::resetInr() { setInr( ResolverNamespaces() ); } - ResolverNamespaces Resolver::inr() const { return _pimpl->inr(); } - void Resolver::setOnlyRequires( bool yesno_r ) { _pimpl->setOnlyRequires( yesno_r ); } void Resolver::resetOnlyRequires() { _pimpl->setOnlyRequires( indeterminate ); } bool Resolver::onlyRequires() const { return _pimpl->onlyRequires(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/Resolver.h new/libzypp-17.10.3/zypp/Resolver.h --- old/libzypp-17.10.1/zypp/Resolver.h 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/Resolver.h 2018-12-10 16:06:59.000000000 +0100 @@ -189,15 +189,6 @@ bool ignoreAlreadyRecommended() const; /** - * Weak form of \ref ignoreAlreadyRecommended \c =false. - * Try to re-evaluate recommendations for specific namespaces only. - * \note May not support all namespaces. - */ - void setInr( ResolverNamespaces namespaces_r ); - void resetInr(); - ResolverNamespaces inr() const; - - /** * Setting whether required packages are installed ONLY * So recommended packages, language packages and packages which depend * on hardware (modalias) will not be regarded. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/Target.h new/libzypp-17.10.3/zypp/Target.h --- old/libzypp-17.10.1/zypp/Target.h 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/zypp/Target.h 2018-12-10 16:41:40.000000000 +0100 @@ -93,6 +93,10 @@ /** Return the root set for this target */ Pathname root() const; + /** Whether the targets \ref root is not \c "/". */ + bool chrooted() const + { return( ! root().emptyOrRoot() ); } + /** Return the path prefixed by the target root, unless it already is prefixed. */ Pathname assertRootPrefix( const Pathname & path_r ) const { return Pathname::assertprefix( root(), path_r ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/base/Env.h new/libzypp-17.10.3/zypp/base/Env.h --- old/libzypp-17.10.1/zypp/base/Env.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libzypp-17.10.3/zypp/base/Env.h 2018-12-10 16:41:40.000000000 +0100 @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ +/** \file zypp/base/Env.h + */ +#ifndef ZYPP_BASE_ENV_H +#define ZYPP_BASE_ENV_H + +#include <cstdlib> +#include <string> +#include <memory> + +/////////////////////////////////////////////////////////////////// +namespace zypp +{ + /////////////////////////////////////////////////////////////////// + namespace env + { + /////////////////////////////////////////////////////////////////// + /// \class ScopedSet + /// \brief Temporarily set/unset an environment variable + /// \ingroup g_RAII + struct ScopedSet + { + ScopedSet( const ScopedSet & ) = delete; + ScopedSet & operator=( const ScopedSet & ) = delete; + + ScopedSet( ScopedSet && ) = default; + ScopedSet & operator=( ScopedSet && ) = default; + + public: + /** Default ctor (NOOP). */ + ScopedSet() + {} + + /** Set \a var_r to \a val_r (unsets \a var_r if \a val_r is a \c nullptr). */ + ScopedSet( std::string var_r, const char * val_r ) + : _var { std::move(var_r) } + { + if ( !_var.empty() ) + { + if ( const char * orig = ::getenv( _var.c_str() ) ) + _val.reset( new std::string( orig ) ); + setval( val_r ); + } + } + + /** Restore the original setting. */ + ~ScopedSet() + { + if ( !_var.empty() ) + setval( _val ? _val->c_str() : nullptr ); + } + + private: + void setval( const char * val_r ) + { + if ( val_r ) + ::setenv( _var.c_str(), val_r, 1 ); + else + ::unsetenv( _var.c_str() ); + } + + private: + std::string _var; + std::unique_ptr<std::string> _val; + }; + + } // namespace env + /////////////////////////////////////////////////////////////////// +} // namespace zypp +/////////////////////////////////////////////////////////////////// +#endif // ZYPP_BASE_ENV_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/repo/Applydeltarpm.cc new/libzypp-17.10.3/zypp/repo/Applydeltarpm.cc --- old/libzypp-17.10.1/zypp/repo/Applydeltarpm.cc 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/zypp/repo/Applydeltarpm.cc 2018-11-29 11:26:23.000000000 +0100 @@ -82,7 +82,7 @@ else WAR << "No executable " << prog << endl; } - return _last; + return ( bool ) _last; } /****************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/solver/detail/Resolver.cc new/libzypp-17.10.3/zypp/solver/detail/Resolver.cc --- old/libzypp-17.10.1/zypp/solver/detail/Resolver.cc 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/solver/detail/Resolver.cc 2018-12-10 16:06:59.000000000 +0100 @@ -76,7 +76,6 @@ OUTS( _solveSrcPackages ); OUTS( _cleandepsOnRemove ); OUTS( _ignoreAlreadyRecommended ); - OUTS( _inr ); #undef OUT return os << "<resolver/>"; } @@ -95,8 +94,6 @@ , _solveSrcPackages ( false ) , _cleandepsOnRemove ( ZConfig::instance().solver_cleandepsOnRemove() ) , _ignoreAlreadyRecommended ( true ) - // _inr defaults to ResolverNamespaces() - { sat::Pool satPool( sat::Pool::instance() ); _satResolver = new SATResolver(_pool, satPool.get()); @@ -311,7 +308,6 @@ _satResolver->setFixsystem ( isVerifyingMode() ); _satResolver->setIgnorealreadyrecommended ( ignoreAlreadyRecommended() ); - _satResolver->setInr ( inr() ); _satResolver->setOnlyRequires ( onlyRequires() ); _satResolver->setUpdatesystem (_updateMode); _satResolver->setSolveSrcPackages ( solveSrcPackages() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/solver/detail/Resolver.h new/libzypp-17.10.3/zypp/solver/detail/Resolver.h --- old/libzypp-17.10.1/zypp/solver/detail/Resolver.h 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/solver/detail/Resolver.h 2018-12-10 16:06:59.000000000 +0100 @@ -95,7 +95,6 @@ bool _cleandepsOnRemove; // whether removing a package should also remove no longer needed requirements bool _ignoreAlreadyRecommended; //ignore recommended packages that have already been recommended by the installed packages - ResolverNamespaces _inr; // Try to re-evaluate recommendations for these namespaces //@} // Additional QueueItems which has to be regarded by the solver @@ -168,9 +167,6 @@ bool ignoreAlreadyRecommended() const { return _ignoreAlreadyRecommended; } void setIgnoreAlreadyRecommended( bool yesno_r ) { _ignoreAlreadyRecommended = yesno_r; } - ResolverNamespaces inr() const { return _inr; } - void setInr( ResolverNamespaces namespaces_r ) { _inr = namespaces_r; } - bool onlyRequires () const { return _onlyRequires; } void setOnlyRequires( TriBool state_r ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/solver/detail/SATResolver.cc new/libzypp-17.10.3/zypp/solver/detail/SATResolver.cc --- old/libzypp-17.10.1/zypp/solver/detail/SATResolver.cc 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/solver/detail/SATResolver.cc 2018-12-10 16:06:59.000000000 +0100 @@ -170,7 +170,6 @@ os << " solveSrcPackages = " << _solveSrcPackages << endl; os << " cleandepsOnRemove = " << _cleandepsOnRemove << endl; os << " fixsystem = " << _fixsystem << endl; - os << " inr namespace = " << _inr << endl; } else { os << "<NULL>"; } @@ -193,7 +192,7 @@ , _updatesystem(false) , _noupdateprovide ( false ) , _dosplitprovides ( true ) - , _onlyRequires(ZConfig::instance().solver_onlyRequires()) + , _onlyRequires (ZConfig::instance().solver_onlyRequires()) , _ignorealreadyrecommended(true) , _distupgrade(false) , _distupgrade_removeunsupported(false) @@ -406,7 +405,8 @@ solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall); solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide); solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides); - solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires); + solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, false); // resolve recommended namespaces + solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires); // solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_DOWNGRADE, _dup_allowdowngrade ); solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, _dup_allownamechange ); solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, _dup_allowarchchange ); @@ -625,19 +625,9 @@ } // Ad rules for changed requestedLocales - const auto & trackedLocaleIds( myPool().trackedLocaleIds() ); - if ( _inr.testFlag( ResolverNamespace::language ) ) - { - // inr mode - for ( const auto & locale : trackedLocaleIds.current() ) - { - queue_push( &(_jobQueue), SOLVER_INSTALL | SOLVER_SOLVABLE_PROVIDES ); - queue_push( &(_jobQueue), Capability( ResolverNamespace::language, IdString(locale) ).id() ); - } - // TODO cleanup not requested locale packages? - } - else { + const auto & trackedLocaleIds( myPool().trackedLocaleIds() ); + // just track changed locakes for ( const auto & locale : trackedLocaleIds.added() ) { @@ -858,7 +848,8 @@ solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall); solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide); solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides); - solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires); + solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, false); // resolve recommended namespaces + solver_set_flag(_satSolver, SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED, _onlyRequires); // sat::Pool::instance().prepare(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/solver/detail/SATResolver.h new/libzypp-17.10.3/zypp/solver/detail/SATResolver.h --- old/libzypp-17.10.1/zypp/solver/detail/SATResolver.h 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/solver/detail/SATResolver.h 2018-12-10 16:06:59.000000000 +0100 @@ -103,7 +103,7 @@ 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 _onlyRequires:1; // true: consider required packages only (but recommended namespaces) bool _ignorealreadyrecommended:1; // true: ignore recommended packages that were already recommended by the installed packages bool _distupgrade:1; bool _distupgrade_removeunsupported:1; @@ -115,8 +115,6 @@ bool _cleandepsOnRemove:1; // whether removing a package should also remove no longer needed requirements private: - ResolverNamespaces _inr; // Try to re-evaluate recommendations for these namespaces - private: // ---------------------------------- methods std::string SATprobleminfoString (Id problem, std::string &detail, Id &ignoreId); void resetItemTransaction (PoolItem item); @@ -178,9 +176,6 @@ bool ignorealreadyrecommended () const {return _ignorealreadyrecommended;} void setIgnorealreadyrecommended ( const bool ignorealreadyrecommended) { _ignorealreadyrecommended = ignorealreadyrecommended;} - ResolverNamespaces inr() const { return _inr; } - void setInr( ResolverNamespaces namespaces_r ) { _inr = namespaces_r; } - bool distupgrade () const {return _distupgrade;} void setDistupgrade ( const bool distupgrade) { _distupgrade = distupgrade;} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/solver/detail/Testcase.cc new/libzypp-17.10.3/zypp/solver/detail/Testcase.cc --- old/libzypp-17.10.1/zypp/solver/detail/Testcase.cc 2018-10-05 11:37:18.000000000 +0200 +++ new/libzypp-17.10.3/zypp/solver/detail/Testcase.cc 2018-12-10 16:06:59.000000000 +0100 @@ -308,7 +308,6 @@ void deleteResolvable( const PoolItem & pi_r ); void addDependencies (const CapabilitySet &capRequire, const CapabilitySet &capConflict); void addUpgradeRepos( const std::set<Repository> & upgradeRepos_r ); - void addInr( ResolverNamespaces namespaces_r ); std::string filename () { return dumpFile; } }; @@ -464,12 +463,6 @@ } } -void HelixControl::addInr( ResolverNamespaces namespaces_r ) -{ - if ( namespaces_r ) - *file << "<inrNamespaces str=\"" << namespaces_r << "\" int=\"" << str::numstring((namespaces_r)) << "\"/>" << endl; -} - //--------------------------------------------------------------------------- Testcase::Testcase() @@ -601,7 +594,6 @@ control.addDependencies (SystemCheck::instance().requiredSystemCap(), SystemCheck::instance().conflictSystemCap()); control.addUpgradeRepos( resolver.upgradeRepos() ); - control.addInr( resolver.inr() ); control.addTagIf( "distupgrade", resolver.isUpgradeMode() ); control.addTagIf( "update", resolver.isUpdateMode() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/target/TargetImpl.cc new/libzypp-17.10.3/zypp/target/TargetImpl.cc --- old/libzypp-17.10.1/zypp/target/TargetImpl.cc 2018-11-19 16:01:31.000000000 +0100 +++ new/libzypp-17.10.3/zypp/target/TargetImpl.cc 2018-12-03 12:06:22.000000000 +0100 @@ -1100,8 +1100,6 @@ return true; }); } - - INT << "Needreboot " << needrebootSpec << endl; satpool.setNeedrebootSpec( std::move(needrebootSpec) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp/zypp_detail/ZYppImpl.cc new/libzypp-17.10.3/zypp/zypp_detail/ZYppImpl.cc --- old/libzypp-17.10.1/zypp/zypp_detail/ZYppImpl.cc 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/zypp/zypp_detail/ZYppImpl.cc 2018-12-10 16:41:40.000000000 +0100 @@ -14,6 +14,7 @@ #include "zypp/TmpPath.h" #include "zypp/base/Logger.h" #include "zypp/base/String.h" +#include "zypp/base/Env.h" #include "zypp/zypp_detail/ZYppImpl.h" #include "zypp/target/TargetImpl.h" @@ -147,8 +148,6 @@ * and target used for transact. */ ZYppCommitResult ZYppImpl::commit( const ZYppCommitPolicy & policy_r ) { - setenv( "ZYPP_IS_RUNNING", str::numstring(getpid()).c_str(), 1 ); - if ( getenv("ZYPP_TESTSUITE_FAKE_ARCH") ) { ZYPP_THROW( Exception("ZYPP_TESTSUITE_FAKE_ARCH set. Commit not allowed and disabled.") ); @@ -158,6 +157,12 @@ if (! _target) ZYPP_THROW( Exception("Target not initialized.") ); + + env::ScopedSet ea { "ZYPP_IS_RUNNING", str::numstring(getpid()).c_str() }; + env::ScopedSet eb; + if ( _target->chrooted() ) + eb = env::ScopedSet( "SYSTEMD_OFFLINE", "1" ); // bsc#1118758 - indicate no systemd if chrooted install + ZYppCommitResult res = _target->_pimpl->commit( pool(), policy_r ); if (! policy_r.dryRun() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.10.1/zypp.conf new/libzypp-17.10.3/zypp.conf --- old/libzypp-17.10.1/zypp.conf 2018-10-01 14:31:07.000000000 +0200 +++ new/libzypp-17.10.3/zypp.conf 2018-12-10 16:06:59.000000000 +0100 @@ -344,9 +344,9 @@ ## -## Whether required packages are installed ONLY -## So recommended packages, language packages and packages which depend -## on hardware (modalias) will not be regarded. +## Whether only required packages are installed. +## +## Recommended packages, will not be regarded. ## ## Valid values: boolean ## Default value: false
