Bug 967121 - 'yum remove' exits on unreachable repo with 'skip_if_unavailabe=1' set
'yum remove' exits on unreachable repo with 'skip_if_unavailabe=1' set
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
Unspecified Unspecified
medium Severity medium
: beta
: ---
Assigned To: packaging-team-maint
Karel Srot
Depends On:
  Show dependency treegraph
Reported: 2013-05-24 15:34 EDT by Karel Srot
Modified: 2014-10-14 00:36 EDT (History)
6 users (show)

See Also:
Fixed In Version: yum-3.2.29-54.el6
Doc Type: Bug Fix
Doc Text:
Cause: have an unavailable repo with 'skip_if_unavailabe=1' and run 'yum remove' Consequence: yum sees an unavailable repo and exits Fix: patch Result: the unavailable repo with 'skip_if_unavailabe=1' is skipped and 'yum remove' works as expected
Story Points: ---
Clone Of: 842031
Last Closed: 2014-10-14 00:36:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2013-05-24 15:34:29 EDT
encountered on RHEL-6.4 with yum-3.2.29-40.el6

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

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.
Comment 1 Zdeněk Pavlas 2013-05-28 02:38:54 EDT
I thought this was fixed already.. Does it fail with --noplugins, too?  The skip_if_unavailable is in effect when requesting "primary" or "all" metadata only.

It might be the langpack plugin, asking for "comps"..
Comment 2 Jim 2013-07-25 15:15:16 EDT
I can confirm that this bug is still in effect with the "--noplugins" flag.
Comment 3 Jim 2013-07-25 15:16:18 EDT
But only for certain yum commands. "yum install" works, but "yum remove" does not.
Comment 4 Zdeněk Pavlas 2013-07-29 04:24:34 EDT
That's possible, "yum remove" does not set up repos unless dependencies need to be resolved.. but most "simple" package removals work, I assume?  Seems to be fixed upstream already (complex removals work, skipping unreachable repositories).  Do you have a "yum remove" reproducer?
Comment 5 Jim 2013-11-25 12:31:52 EST
This is still an issue in the newest version of rhel (6.4), with trivial removals:

# package-cleanup --leaves
Loaded plugins: fastestmirror

# yum remove NetworkManager-glib --noplugins
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package NetworkManager-glib.x86_64 1:0.8.1-43.el6 will be erased
--> Finished Dependency Resolution
<stripped> : [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: <stripped> . Please verify its path and try again
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodiges

All of my repos have "skip_if_unavailable=1"
Comment 6 Valentina Mukhamedzhanova 2014-04-08 10:37:01 EDT
I can't reproduce it on 6.5, could you please provide a reproducer?

# yum install vala
Loaded plugins: product-id, rhnplugin, security, subscription-manager, verify
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
http://internal/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'internal'"
Trying other mirror.
repo-01022604                                                                    | 1.9 kB     00:00 ... 
repo-01022604/primary                                                            |  205 B     00:00 ... 
rhel-x86_64-server-6                                                             | 1.8 kB     00:00     
rhel-x86_64-server-6/primary                                                     |  17 MB     00:14
Comment 7 Karel Srot 2014-04-09 08:53:17 EDT
(In reply to Valentina Mukhamedzhanova from comment #6)
> I can't reproduce it on 6.5, could you please provide a reproducer?

# cat /etc/yum.repos.d/test.repo 

# yum -y install aide
# yum clean all
# yum remove aide --noplugins
Comment 16 errata-xmlrpc 2014-10-14 00:36:28 EDT
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.


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