[yum-commits] yumcommands.py yum/repos.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Mon Jan 20 15:45:13 UTC 2014
yum/repos.py | 2 +-
yumcommands.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 6aa247420a6ab58af87b11d912f0d2cb99002e08
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Jan 20 09:37:20 2014 +0100
repo-pkgs: Fix repoid parsing. BZ 1055132.
checkRepoPackageArg() is relaxed but doCommand() assumes a repoid.
Make these use the same repo. When matching names, match ui_id too.
diff --git a/yum/repos.py b/yum/repos.py
index 67ef1e4..d5e50ac 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -215,7 +215,7 @@ class RepoStorage:
match = misc.compile_pattern(item.strip(), ignore_case)
for name,repo in self.repos.items():
assert name == repo.id
- if match(name):
+ if match(name) or match(repo.ui_id):
result.append(repo)
elif name_match and match(repo.name):
result.append(repo)
diff --git a/yumcommands.py b/yumcommands.py
index 291eae5..e4fb403 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -155,6 +155,7 @@ def checkRepoPackageArg(base, basecmd, extcmds):
base.repos.enableRepo(repos[0].id)
base.verbose_logger.info(
_('Repo %s has been automatically enabled.') % repos[0].ui_id)
+ return repos[0].id
def checkItemArg(base, basecmd, extcmds):
@@ -3501,8 +3502,7 @@ class RepoPkgsCommand(YumCommand):
"""
checkRootUID(base)
checkGPGKey(base)
- checkRepoPackageArg(base, basecmd, extcmds)
- checkEnabledRepo(base, extcmds)
+ self.repoid = checkRepoPackageArg(base, basecmd, extcmds)
def doCommand(self, base, basecmd, extcmds):
"""Execute this command.
@@ -3523,7 +3523,7 @@ class RepoPkgsCommand(YumCommand):
for txmbr in txmbrs:
txmbr.repopkg = repoid
- repoid = extcmds[0]
+ repoid = self.repoid
cmd = extcmds[1]
args = extcmds[2:]
noargs = False
More information about the Yum-commits
mailing list