Bug 1029359
| Summary: | yum grouplist ignores skip_if_unavailable=1 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Alon Bar-Lev <alonbl> |
| Component: | yum | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED ERRATA | QA Contact: | Karel Srot <ksrot> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4 | CC: | alonbl, iheim, james.antill, jzeleny, ksrot, packaging-team-maint, vmukhame |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | yum-3.2.29-55.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: have an unavailable repo with 'skip_if_unavailabe=1' and run 'yum grouplist'
Consequence: yum sees an unavailable repo and exits
Fix: patch
Result: the unavailable repo with 'skip_if_unavailabe=1' is skipped and 'yum grouplist' works as expected
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-14 04:37:04 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1028455 | ||
|
Description
Alon Bar-Lev
2013-11-12 09:17:54 UTC
Reproduced the bug. It's fixed upstream, as a side effect of the following 1-line commit. Backporting fixed the bug in my reproducer.
commit 83b1afba634f361fefc7d9eef53133c501e58aeb
Author: James Antill <james>
Date: Tue Jun 28 15:59:22 2011 -0400
Don't call repo.doSetup() if we've already setup the repos. BZ 717163.
Test: yum in @core == has setup.
yum rm @core == hasn't setup.
diff --git a/yum/__init__.py b/yum/__init__.py
index 92f25d4..2dce3bf 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -792,7 +792,9 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.log(logginglevels.DEBUG_4,
_('Getting group metadata'))
reposWithGroups = []
- self.repos.doSetup()
+ # Need to make sure the groups data is ready to read. Really we'd want
+ # to add groups to the mdpolicy list of the repo. but we don't atm.
+ self.pkgSack
for repo in self.repos.listGroupsEnabled():
if repo.groups_added: # already added the groups from this repo
Thanks for quick response! VERIFIED tested with /CoreOS/yum/Regression/bz1029359-yum-grouplist-ignores-skip_if_unavailable yum-3.2.29-59.el6.noarch: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Running 'yum --disablerepo=\* --enablerepo=bz1029359repo\* --noplugins grouplist &> log' (Expected 0, got 0) :: [ PASS ] :: File 'log' should contain 'test-group-a' :: [ LOG ] :: Duration: 1s :: [ LOG ] :: Assertions: 2 good, 0 bad :: [ PASS ] :: RESULT: Test yum-3.2.29-43.el6_5.noarch: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ FAIL ] :: Running 'yum --disablerepo=\* --enablerepo=bz1029359repo\* --noplugins grouplist &> log' (Expected 0, got 1) Setting up Group Process http://127.0.0.9/nosuchrepo/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host" Trying other mirror. http://127.0.0.9/nosuchrepo/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: bz1029359repoA. Please verify its path and try again :: [ FAIL ] :: File 'log' should contain 'test-group-a' '52b322ff-dc77-4d7b-b718-d1802a05a93d' Test result: FAIL Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1410.html |