Bug 842031 - 'yum install' exits on unreachable repo with 'skip_if_unavailabe=1' set
'yum install' exits on unreachable repo with 'skip_if_unavailabe=1' set
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
17
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
: 844469 (view as bug list)
Depends On: 828658 845581
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-20 22:02 EDT by Paul Wouters
Modified: 2014-01-21 18:23 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 828658
: 967121 (view as bug list)
Environment:
Last Closed: 2012-09-07 07:25:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Wouters 2012-07-20 22:02:37 EDT
yum install xxx with one bad repository  with skip_if_unavailable=1 aborts entirely instead of just skipping that bad repository.

Note in my case there is no 404, but:


[paul@bofh vala]$ sudo yum install vala
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
http://download.lab.bos.redhat.com/devel/dmach/repos/XXXXXXX/fedora/17/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host"
Trying other mirror.
Error: failure: repodata/repomd.xml from XXXXXXX-fedora: [Errno 256] No more mirrors to try.

because my VPN is down, it is not be able to resolve the internal only dns entry, so it should ignore this repository.






+++ This bug was initially created as a clone of Bug #828658 +++

Present on RHEL5 too

yum-3.2.22-40.el5



+++ This bug was initially created as a clone of Bug #769864 +++

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:

--- Additional comment from zpavlas@redhat.com on 2012-01-12 07:19:39 EST ---

> 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!

--- Additional comment from djasa@redhat.com on 2012-01-12 07:35:40 EST ---

(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.

--- Additional comment from pm-rhel@redhat.com on 2012-06-11 21:22:41 EDT ---

This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 1 Zdeněk Pavlas 2012-07-26 09:17:21 EDT
Reproduced this bug, both install+update are affected, will fix it shorty..  Thanks for the report!
Comment 2 Zdeněk Pavlas 2012-08-01 03:54:07 EDT
*** Bug 844469 has been marked as a duplicate of this bug. ***
Comment 3 Trond H. Amundsen 2012-08-27 05:40:35 EDT
I've encountered this as well. We have a repo that is only reachable from within our network. From what I can see, with 'skip_if_unavailable=1' set for this repo, yum update/install/list/etc. works on rhel6 (yum-3.2.29-30.el6.noarch), but not on F17 (yum-3.4.3-28.fc17.noarch).
Comment 4 Fedora Update System 2012-09-03 09:35:27 EDT
yum-3.4.3-29.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/yum-3.4.3-29.fc17
Comment 5 Fedora Update System 2012-09-03 18:53:04 EDT
Package yum-3.4.3-29.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-29.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13229/yum-3.4.3-29.fc17
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2012-09-07 07:25:15 EDT
yum-3.4.3-29.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.