diff --git a/0001-Change-name-of-def-valid.patch b/0001-Change-name-of-def-valid.patch deleted file mode 100644 index e6d650b..0000000 --- a/0001-Change-name-of-def-valid.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 45f1dd636cb14cd45049393eb17238f518694455 Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Wed, 20 Jul 2016 16:44:07 +0200 -Subject: [PATCH] Change name of def valid() - -The change is required by privatization of non-API functions. ---- - tests/support.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/support.py b/tests/support.py -index 31fb91f..3dbc4bd 100644 ---- a/tests/support.py -+++ b/tests/support.py -@@ -161,7 +161,7 @@ class RepoStub(object): - self.priority = 99 - self.cost = 1000 - -- def valid(self): -+ def _valid(self): - """Return a message if the repository is not valid.""" - - def enable(self): --- -2.7.4 - diff --git a/0001-cls.chroot_config-inside-_guess_chroot-returns-None-.patch b/0001-cls.chroot_config-inside-_guess_chroot-returns-None-.patch new file mode 100644 index 0000000..217d312 --- /dev/null +++ b/0001-cls.chroot_config-inside-_guess_chroot-returns-None-.patch @@ -0,0 +1,59 @@ +From 3809fe6889eeb884e78685fd940c81dedbb6df4f Mon Sep 17 00:00:00 2001 +From: Michael Goodwin +Date: Thu, 28 Jul 2016 14:54:53 -0400 +Subject: [PATCH] cls.chroot_config inside _guess_chroot returns None (RhBug: + 1361003) + +--- + plugins/copr.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/plugins/copr.py b/plugins/copr.py +index f24c202..3994f23 100644 +--- a/plugins/copr.py ++++ b/plugins/copr.py +@@ -136,7 +136,7 @@ class CoprCommand(dnf.cli.Command): + try: + chroot = extcmds[2] + except IndexError: +- chroot = self._guess_chroot() ++ chroot = self._guess_chroot(self.chroot_config) + + # commands without defined copr_username/copr_projectname + if subcommand == "list": +@@ -261,11 +261,11 @@ Do you want to continue? [y/N]: """) + raise dnf.exceptions.Error( + _('This command has to be run under the root user.')) + +- @classmethod +- def _guess_chroot(cls): ++ @staticmethod ++ def _guess_chroot(chroot_config): + """ Guess which chroot is equivalent to this machine """ + # FIXME Copr should generate non-specific arch repo +- dist = cls.chroot_config ++ dist = chroot_config + if dist is None or (dist[0] is False) or (dist[1] is False): + dist = platform.linux_distribution() + if "Fedora" in dist: +@@ -289,7 +289,7 @@ Do you want to continue? [y/N]: """) + + def _download_repo(self, project_name, repo_filename, chroot=None): + if chroot is None: +- chroot = self._guess_chroot() ++ chroot = self._guess_chroot(self.chroot_config) + short_chroot = '-'.join(chroot.split('-')[:2]) + #http://copr.fedorainfracloud.org/coprs/larsks/rcm/repo/epel-7-x86_64/ + api_path = "/coprs/{0}/repo/{1}/".format(project_name, short_chroot) +@@ -434,7 +434,7 @@ Do you want to continue? [y/N]: """) + raise dnf.cli.CliError( + _('exactly one parameter to ' + 'playground command is required')) +- chroot = self._guess_chroot() ++ chroot = self._guess_chroot(self.chroot_config) + if subcommand == "enable": + self._cmd_enable(chroot) + logger.info(_("Playground repositories successfully enabled.")) +-- +2.7.4 + diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 059eea0..5bade18 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -15,7 +15,7 @@ Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz -Patch0001: 0001-Change-name-of-def-valid.patch +Patch0001: 0001-cls.chroot_config-inside-_guess_chroot-returns-None-.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext