Hello community, here is the log from the commit of package dnf for openSUSE:Factory checked in at 2020-12-03 18:42:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dnf (Old) and /work/SRC/openSUSE:Factory/.dnf.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dnf" Thu Dec 3 18:42:10 2020 rev:21 rq:852448 version:4.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/dnf/dnf.changes 2020-10-28 11:26:13.814900569 +0100 +++ /work/SRC/openSUSE:Factory/.dnf.new.5913/dnf.changes 2020-12-03 18:43:24.934212126 +0100 @@ -1,0 +2,10 @@ +Sun Nov 29 23:50:38 UTC 2020 - Neal Gompa <[email protected]> + +- Update to version 4.4.2 + + Warn about key retrieval over http + + Fix --setopt=cachedir writing outside of installroot + + Add vendor to dnf API (rh#1876561) + + Add allow_vendor_change option (rh#1788371) (rh#1788371) +- Rename dnf-conf package to dnf-data, in line with upstream + +------------------------------------------------------------------- Old: ---- dnf-4.4.0.tar.gz New: ---- dnf-4.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dnf.spec ++++++ --- /var/tmp/diff_new_pack.9IpvXH/_old 2020-12-03 18:43:25.474212840 +0100 +++ /var/tmp/diff_new_pack.9IpvXH/_new 2020-12-03 18:43:25.478212845 +0100 @@ -17,7 +17,7 @@ # -%global hawkey_version 0.54.1 +%global hawkey_version 0.55.0 %global libcomps_version 0.1.8 %global rpm_version 4.14.0 %global min_plugins_core 4.0.16 @@ -47,7 +47,7 @@ %bcond_with tests Name: dnf -Version: 4.4.0 +Version: 4.4.2 Release: 0 Summary: Package manager forked from Yum, using libsolv as a dependency resolver # For a breakdown of the licensing, see PACKAGE-LICENSING @@ -96,13 +96,15 @@ DNF is an package manager for RPM systems that was forked from Yum. Among the many improvements, it uses libsolv as a dependency resolver. -%package conf -Summary: Configuration files for DNF +%package data +Summary: Common data and configuration files for DNF Group: System/Packages +Obsoletes: dnf-conf < 4.4.2 +Provides: dnf-conf = %{version}-%{release} Recommends: logrotate -%description conf -This package provides the configuration files for DNF. +%description data +This package provides the common data and configuration files for DNF. %package -n %{yum_subpackage_name} Summary: As a Yum CLI compatibility layer, supplies %{_bindir}/yum redirecting to DNF @@ -153,7 +155,7 @@ BuildRequires: python3-rpm >= %{rpm_version} Recommends: (python3-dbus-python if NetworkManager) Requires: deltarpm -Requires: dnf-conf = %{version}-%{release} +Requires: dnf-data = %{version}-%{release} Requires: python3-curses Requires: python3-gpg Requires: python3-hawkey >= %{hawkey_version} @@ -251,7 +253,7 @@ %files lang -f %{name}.lang -%files conf +%files data %license COPYING PACKAGE-LICENSING %doc AUTHORS README.rst %dir %{confdir} ++++++ dnf-4.4.0.tar.gz -> dnf-4.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/VERSION.cmake new/dnf-4.4.2/VERSION.cmake --- old/dnf-4.4.0/VERSION.cmake 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/VERSION.cmake 2020-11-09 15:58:43.000000000 +0100 @@ -1,4 +1,4 @@ -set (DEFAULT_DNF_VERSION "4.4.0") +set (DEFAULT_DNF_VERSION "4.4.2") if(DEFINED DNF_VERSION) if(NOT ${DEFAULT_DNF_VERSION} STREQUAL ${DNF_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/automatic/main.py new/dnf-4.4.2/dnf/automatic/main.py --- old/dnf-4.4.0/dnf/automatic/main.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/automatic/main.py 2020-11-09 15:58:43.000000000 +0100 @@ -28,7 +28,7 @@ import socket import time -from dnf.i18n import _, ucd +from dnf.i18n import _, ucd, P_ import dnf import dnf.automatic.emitter import dnf.cli @@ -305,7 +305,7 @@ if opts.timer: sleeper = random.randint(0, conf.commands.random_sleep) - logger.debug(_('Sleep for %s seconds'), sleeper) + logger.debug(P_('Sleep for {} second', 'Sleep for {} seconds', sleeper).format(sleeper)) time.sleep(sleeper) base.pre_configure_plugins() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/base.py new/dnf-4.4.2/dnf/base.py --- old/dnf-4.4.0/dnf/base.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/base.py 2020-11-09 15:58:43.000000000 +0100 @@ -415,7 +415,7 @@ else: self.repos.all().disable() conf = self.conf - self._sack._configure(conf.installonlypkgs, conf.installonly_limit) + self._sack._configure(conf.installonlypkgs, conf.installonly_limit, conf.allow_vendor_change) self._setup_excludes_includes() timer() self._goal = dnf.goal.Goal(self._sack) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/cli/cli.py new/dnf-4.4.2/dnf/cli/cli.py --- old/dnf-4.4.0/dnf/cli/cli.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/cli/cli.py 2020-11-09 15:58:43.000000000 +0100 @@ -974,8 +974,6 @@ self.base.configure_plugins() - self.base.conf._configure_from_options(opts) - self.command.configure() if self.base.conf.destdir: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/cli/commands/history.py new/dnf-4.4.2/dnf/cli/commands/history.py --- old/dnf-4.4.0/dnf/cli/commands/history.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/cli/commands/history.py 2020-11-09 15:58:43.000000000 +0100 @@ -33,7 +33,6 @@ import json import logging import os -import sys logger = logging.getLogger('dnf') @@ -293,13 +292,6 @@ elif vcmd == 'userinstalled': ret = self._hcmd_userinstalled() elif vcmd == 'store': - print( - "Warning: The stored transaction format is considered unstable and may " - "change at any time. It will work if the same version of dnf is used to " - "store and replay (or between versions as long as it stays the same).", - file=sys.stderr - ) - transactions = self.output.history.old(tids) if not transactions: raise dnf.cli.CliError(_('Transaction ID "{id}" not found.').format(id=tids[0])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/crypto.py new/dnf-4.4.2/dnf/crypto.py --- old/dnf-4.4.0/dnf/crypto.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/crypto.py 2020-11-09 15:58:43.000000000 +0100 @@ -173,6 +173,8 @@ def retrieve(keyurl, repo=None): + if keyurl.startswith('http:'): + logger.warning(_("retrieving repo key for %s unencrypted from %s"), repo.id, keyurl) with dnf.util._urlopen(keyurl, repo=repo) as handle: keyinfos = rawkey2infos(handle) for keyinfo in keyinfos: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf/sack.py new/dnf-4.4.2/dnf/sack.py --- old/dnf-4.4.0/dnf/sack.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf/sack.py 2020-11-09 15:58:43.000000000 +0100 @@ -23,10 +23,13 @@ import dnf.util import dnf.package import dnf.query +import logging import hawkey import os from dnf.pycomp import basestring +from dnf.i18n import _ +logger = logging.getLogger("dnf") class Sack(hawkey.Sack): # :api @@ -34,10 +37,14 @@ def __init__(self, *args, **kwargs): super(Sack, self).__init__(*args, **kwargs) - def _configure(self, installonly=None, installonly_limit=0): + def _configure(self, installonly=None, installonly_limit=0, allow_vendor_change=None): if installonly: self.installonly = installonly self.installonly_limit = installonly_limit + if allow_vendor_change is not None: + self.allow_vendor_change = allow_vendor_change + if allow_vendor_change is False: + logger.warning(_("allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands")) def query(self, flags=0): # :api diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/dnf.spec new/dnf-4.4.2/dnf.spec --- old/dnf-4.4.0/dnf.spec 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/dnf.spec 2020-11-09 15:58:43.000000000 +0100 @@ -1,5 +1,8 @@ +# Always build out-of-source +%undefine __cmake_in_source_build + # default dependencies -%global hawkey_version 0.54.1 +%global hawkey_version 0.54.4 %global libcomps_version 0.1.8 %global libmodulemd_version 1.4.0 %global rpm_version 4.14.0 @@ -81,7 +84,7 @@ It supports RPMs, modules and comps groups & environments. Name: dnf -Version: 4.4.0 +Version: 4.4.2 Release: 1%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING @@ -263,39 +266,33 @@ %prep %autosetup -mkdir build-py2 -mkdir build-py3 %build %if %{with python2} - pushd build-py2 - %cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version} - %make_build - make doc-man - popd + %global _vpath_builddir build-py2 + %cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version} + %cmake_build + %cmake_build --target doc-man %endif %if %{with python3} - pushd build-py3 - %cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version} - %make_build - make doc-man - popd + %global _vpath_builddir build-py3 + %cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version} + %cmake_build + %cmake_build --target doc-man %endif %install %if %{with python2} - pushd build-py2 - %make_install - popd + %global _vpath_builddir build-py2 + %cmake_install %endif %if %{with python3} - pushd build-py3 - %make_install - popd + %global _vpath_builddir build-py3 + %cmake_install %endif %find_lang %{name} @@ -352,15 +349,13 @@ %check %if %{with python2} - pushd build-py2 - ctest -VV - popd + %global _vpath_builddir build-py2 + %ctest %endif %if %{with python3} - pushd build-py3 - ctest -VV - popd + %global _vpath_builddir build-py3 + %ctest %endif @@ -507,6 +502,13 @@ %endif %changelog +* Mon Nov 09 2020 Nicola Sella <[email protected]> - 4.4.2-1 +- spec: Fix building with new cmake macros (backport from downstream) +- Warn about key retrieval over http: +- Fix --setopt=cachedir writing outside of installroot +- Add vendor to dnf API (RhBug:1876561) +- Add allow_vendor_change option (RhBug:1788371) (RhBug:1788371) + * Tue Oct 06 2020 Nicola Sella <[email protected]> - 4.4.0-1 - Handle empty comps group name (RhBug:1826198) - Remove dead history info code (RhBug:1845800) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/doc/conf_ref.rst new/dnf-4.4.2/doc/conf_ref.rst --- old/dnf-4.4.0/doc/conf_ref.rst 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/doc/conf_ref.rst 2020-11-09 15:58:43.000000000 +0100 @@ -59,6 +59,16 @@ [main] Options ================ +.. _allow_vendor_change-label: + +``allow_vendor_change`` + :ref:`boolean <boolean-label>` + + If disabled dnf will stick to vendor when upgrading or downgrading rpms. + Default is ``True`` + + .. WARNING:: This option is currently not supported for `downgrade` and `distro-sync` commands + .. _arch-label: ``arch`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/doc/release_notes.rst new/dnf-4.4.2/doc/release_notes.rst --- old/dnf-4.4.0/doc/release_notes.rst 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/doc/release_notes.rst 2020-11-09 15:58:43.000000000 +0100 @@ -20,6 +20,21 @@ ################### =================== +4.4.2 Release Notes +=================== + +- spec: Fix building with new cmake macros (backport from downstream) +- Warn about key retrieval over http: +- Fix --setopt=cachedir writing outside of installroot +- Add vendor to dnf API (RhBug:1876561) +- Add allow_vendor_change option (RhBug:1788371) (RhBug:1788371) + +Bugs fixed in 4.4.2: + +* :rhbug:`1876561` +* :rhbug:`1788371` + +=================== 4.4.0 Release Notes =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/doc/summaries_cache new/dnf-4.4.2/doc/summaries_cache --- old/dnf-4.4.0/doc/summaries_cache 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/doc/summaries_cache 2020-11-09 15:58:43.000000000 +0100 @@ -3222,5 +3222,13 @@ [ 1816573, "[RHEL8/RFE] dnf logrotation experience differs from RHEL7 (yum)" + ], + [ + 1876561, + "dnf python API does not provide a package vendor (as yum API does)" + ], + [ + 1788371, + "[Feature Request] Package vendor stickiness as available in Zypper" ] ] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/etc/logrotate.d/dnf new/dnf-4.4.2/etc/logrotate.d/dnf --- old/dnf-4.4.0/etc/logrotate.d/dnf 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/etc/logrotate.d/dnf 2020-11-09 15:58:43.000000000 +0100 @@ -1,11 +1,3 @@ -/var/log/dnf.librepo.log { - missingok - notifempty - rotate 4 - weekly - create 0600 root root -} - /var/log/hawkey.log { missingok notifempty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_base.py new/dnf-4.4.2/tests/api/test_dnf_base.py --- old/dnf-4.4.0/tests/api/test_dnf_base.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_base.py 2020-11-09 15:58:43.000000000 +0100 @@ -13,7 +13,7 @@ class DnfBaseApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) def tearDown(self): self.base.close() @@ -24,7 +24,7 @@ self.assertHasType(dnf.base.Base, object) def test_init(self): - base = dnf.Base() + base = dnf.Base(dnf.conf.Conf()) def test_init_conf(self): conf = dnf.conf.Conf() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_cli_cli.py new/dnf-4.4.2/tests/api/test_dnf_cli_cli.py --- old/dnf-4.4.0/tests/api/test_dnf_cli_cli.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_cli_cli.py 2020-11-09 15:58:43.000000000 +0100 @@ -12,7 +12,7 @@ class DnfCliCliApiTest(TestCase): def setUp(self): - base = dnf.Base() + base = dnf.Base(dnf.conf.Conf()) self.cli = dnf.cli.cli.Cli(base=base) def test_cli(self): @@ -21,7 +21,7 @@ self.assertHasType(dnf.cli.cli.Cli, object) def test_init(self): - base = dnf.Base() + base = dnf.Base(dnf.conf.Conf()) _ = dnf.cli.cli.Cli(base=base) def test_demands(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_cli_commands.py new/dnf-4.4.2/tests/api/test_dnf_cli_commands.py --- old/dnf-4.4.0/tests/api/test_dnf_cli_commands.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_cli_commands.py 2020-11-09 15:58:43.000000000 +0100 @@ -12,7 +12,7 @@ class DnfCliCommandsApiTest(TestCase): def setUp(self): - base = dnf.Base() + base = dnf.Base(dnf.conf.Conf()) cli = dnf.cli.cli.Cli(base=base) self.command = dnf.cli.commands.Command(cli=cli) @@ -22,7 +22,7 @@ self.assertHasType(dnf.cli.commands.Command, object) def test_init(self): - base = dnf.Base() + base = dnf.Base(dnf.conf.Conf()) cli = dnf.cli.cli.Cli(base=base) _ = dnf.cli.commands.Command(cli=cli) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_conf.py new/dnf-4.4.2/tests/api/test_dnf_conf.py --- old/dnf-4.4.0/tests/api/test_dnf_conf.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_conf.py 2020-11-09 15:58:43.000000000 +0100 @@ -11,7 +11,7 @@ class DnfConfTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) self.conf = self.base.conf def tearDown(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_db_group.py new/dnf-4.4.2/tests/api/test_dnf_db_group.py --- old/dnf-4.4.0/tests/api/test_dnf_db_group.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_db_group.py 2020-11-09 15:58:43.000000000 +0100 @@ -11,7 +11,7 @@ class DnfRPMTransactionApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) self.base.fill_sack(False, False) self.base.resolve() self.rpmTrans = self.base.transaction diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_module_base.py new/dnf-4.4.2/tests/api/test_dnf_module_base.py --- old/dnf-4.4.0/tests/api/test_dnf_module_base.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_module_base.py 2020-11-09 15:58:43.000000000 +0100 @@ -12,7 +12,7 @@ class DnfModuleBaseApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) self.moduleBase = dnf.module.module_base.ModuleBase(self.base) def tearDown(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_module_package.py new/dnf-4.4.2/tests/api/test_dnf_module_package.py --- old/dnf-4.4.0/tests/api/test_dnf_module_package.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_module_package.py 2020-11-09 15:58:43.000000000 +0100 @@ -14,7 +14,7 @@ class DnfModulePackageApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) repo = self.base.repos.add_new_repo( 'api-module-test-repo', self.base.conf, baseurl=[os.path.join(os.path.dirname(__file__), "../modules/modules/_all/x86_64/")] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_package.py new/dnf-4.4.2/tests/api/test_dnf_package.py --- old/dnf-4.4.0/tests/api/test_dnf_package.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_package.py 2020-11-09 15:58:43.000000000 +0100 @@ -11,7 +11,7 @@ class DnfPackageApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) self.package = self._get_pkg() def tearDown(self): @@ -133,6 +133,11 @@ self.assertHasAttr(self.package, "name") self.assertHasType(self.package.name, str) + def test_vendor(self): + # Package.vendor + self.assertHasAttr(self.package, "vendor") + self.assertHasType(self.package.vendor, str) + def test_obsoletes(self): # Package.obsoletes self.assertHasAttr(self.package, "obsoletes") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_rpm.py new/dnf-4.4.2/tests/api/test_dnf_rpm.py --- old/dnf-4.4.0/tests/api/test_dnf_rpm.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_rpm.py 2020-11-09 15:58:43.000000000 +0100 @@ -13,7 +13,6 @@ def test_detect_releasever(self): # dnf.rpm.detect_releasever self.assertHasAttr(dnf.rpm, "detect_releasever") - self.assertHasType(dnf.rpm.detect_releasever(installroot='/'), str) def test_basearch(self): # dnf.rpm.basearch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_sack.py new/dnf-4.4.2/tests/api/test_dnf_sack.py --- old/dnf-4.4.0/tests/api/test_dnf_sack.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_sack.py 2020-11-09 15:58:43.000000000 +0100 @@ -11,7 +11,7 @@ class DnfSackApiTest(TestCase): def setUp(self): - self.base = dnf.Base() + self.base = dnf.Base(dnf.conf.Conf()) def tearDown(self): self.base.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/api/test_dnf_subject.py new/dnf-4.4.2/tests/api/test_dnf_subject.py --- old/dnf-4.4.0/tests/api/test_dnf_subject.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/api/test_dnf_subject.py 2020-11-09 15:58:43.000000000 +0100 @@ -25,7 +25,7 @@ def test_get_best_query(self): # Subject.get_best_query self.assertHasAttr(self.subject, "get_best_query") - b = dnf.Base() + b = dnf.Base(dnf.conf.Conf()) b.fill_sack(False, False) self.assertHasType( self.subject.get_best_query( @@ -39,7 +39,7 @@ def test_get_best_selector(self): # Subject.get_best_selector self.assertHasAttr(self.subject, "get_best_selector") - b = dnf.Base() + b = dnf.Base(dnf.conf.Conf()) b.fill_sack(False, False) self.assertHasType( self.subject.get_best_selector( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dnf-4.4.0/tests/test_cli.py new/dnf-4.4.2/tests/test_cli.py --- old/dnf-4.4.0/tests/test_cli.py 2020-10-06 15:29:27.000000000 +0200 +++ new/dnf-4.4.2/tests/test_cli.py 2020-11-09 15:58:43.000000000 +0100 @@ -188,10 +188,12 @@ @mock.patch('dnf.util.am_i_root', lambda: False) def test_configure_user(self): """ Test Cli.configure as user.""" - self.base._conf = dnf.conf.Conf() + # call setUp() once again *after* am_i_root() is mocked so the cachedir is set as expected + self.setUp() + self.base._conf.installroot = self._installroot with mock.patch('dnf.rpm.detect_releasever', return_value=69): self.cli.configure(['update', '-c', self.conffile]) - reg = re.compile('^/var/tmp/dnf-[.a-zA-Z0-9_-]+$') + reg = re.compile('^' + self._installroot + '/var/tmp/dnf-[.a-zA-Z0-9_-]+$') self.assertIsNotNone(reg.match(self.base.conf.cachedir)) parser = argparse.ArgumentParser() expected = "%s update -c %s " % (parser.prog, self.conffile) @@ -210,6 +212,7 @@ self.assertEqual(self.cli.cmdstring, expected) def test_configure_verbose(self): + self.base._conf.installroot = self._installroot with mock.patch('dnf.rpm.detect_releasever', return_value=69): self.cli.configure(['-v', 'update', '-c', self.conffile]) parser = argparse.ArgumentParser() _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
