Hide Forgot
Description of problem: SSIA. 'yum update' does not have this problem, unreachable repos with skip_if_unavailable=1 are skipped Version-Release number of selected component (if applicable): yum-3.2.29-22.el6.noarch How reproducible: always Steps to Reproduce: 1. set up a repo: [test] name=test baseurl=<url that is valid but returns 404> enabled=1 skip_if_unavailable=1 2. run yum --disablerepo='*' --enablerepo test makecache 3. Actual results: yum exits complaining that it can not download info for test repo: $BASEURL: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: test. Please verify its path and try again Expected results: yum skips repo Additional info:
> Expected results: yum skips repo You have enabled only one repo, and Yum did skip that. 'skip_if_unavailable=1' does not prevent Yum from printing error messages (that's intended). Could you try '--enablerepo test --enablerepo other' too? This works upstream, but I don't have RHEL6 at hands. Thanks!
(In reply to comment #1) > > Expected results: yum skips repo > > You have enabled only one repo, and Yum did skip that. 'skip_if_unavailable=1' > does not prevent Yum from printing error messages (that's intended). > This exactly does not work in RHEL: # yum makecache ; echo $? Loaded plugins: auto-update-debuginfo, refresh-packagekit, rhnplugin [other repo metadata fetched] <repo_URL>: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: <repo>. Please verify its path and try again 1 yum should ignore the error and keep going through the rest of the repos, it exits with 1 instead.
The bug is not fixed in yum-3.2.29-27.el6.noarch # yum --disablerepo='*' --enablerepo=bz769864repo\* makecache Loaded plugins: downloadonly, local, presto, product-id, refresh-packagekit, rhnplugin, security, : subscription-manager Updating certificate-based repositories. This system is not registered with RHN. RHN Satellite or RHN Classic support will be disabled. http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: bz769864repoA. Please verify its path and try again # yum crashes already at def doCommand(self, base, basecmd, extcmds): ... ... for repo in base.repos.listEnabled(): >>HERE<< repo.repoXML from /usr/share/yum-cli/yumcommands.py.
yum-3.2.29-28.el6.noarch :: [ FAIL ] :: Running 'yum --disablerepo='*' --enablerepo=bz769864repo\* makecache' (Expected 1, got 0) Loaded plugins: downloadonly, presto, product-id, refresh-packagekit, rhnplugin, : security, subscription-manager Updating certificate-based repositories. This system is not registered with RHN. RHN Satellite or RHN Classic support will be disabled. http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Metadata Cache Created http://redhat.com/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Just want to make sure whether it is OK for yum makecache to exit with 0 when the skip_if_unavailable repo is not available. From my point of view it is fine since the repo is expected to be unavailable sometimes, therefore I don't see a reason why yum should fail. Please confirm.
Yeh, seems fine to me ... you told it to skip on errors, and it skipped. Success.
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-2012-0857.html