Bug 745090 - "yum remove" does not honor "skip_if_unavailable" option
Summary: "yum remove" does not honor "skip_if_unavailable" option
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-11 11:26 UTC by Hedayat Vatankhah
Modified: 2014-01-21 23:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-02 08:59:35 UTC
Type: ---


Attachments (Terms of Use)

Description Hedayat Vatankhah 2011-10-11 11:26:37 UTC
Description of problem:
I have a repository with skip_if_unavailable=1 option set. Usually the repository is not available (it is a removable media). Now, I want to remove a package from my system, using yum remove. Since the repository is not available, yum prints and (unrelated) error message and exits (it asks me to try --skip-broken). 
I wonder if yum remove should check for new metadata at all, but even in that case it should honor skip_if_unavailable=1 option.

Version-Release number of selected component (if applicable):
3.2.29-9.fc15

How reproducible:
100%

Steps to Reproduce:
1. create a .repo file for an imaginary repo with skip_if_unavailable option set
2. try to remove a simple package using "yum remove"

  
Actual results:
yum exits with an error message saying that it is unable to fetch repomd.xml for the repository, and suggests to try --skip-broken

Expected results:
Remove the package successfully.

Comment 1 Zdeněk Pavlas 2011-10-18 12:21:43 UTC
Hi!

> Since the repository is not available, yum prints and (unrelated) error message and exits (it asks me to try --skip-broken). 

skip_if_unavailable=1 option does not prevent yum from displaying error messages during repo setup, it should just ignore such errors.  I think this works well (at least for removable media).

Maybe yum exits due to unrelated dependency issue?  Can you post the yum output, ideally with -d9?  Thanks.

Comment 2 Hedayat Vatankhah 2011-10-18 14:27:42 UTC
I found the same problem with "yum grouplist" command.
No, yum doesn't exit with any dependency issue and if I provide the repository it'll remove the package without any problems. Also I installed a new package and tried removing it and faced the same problem. 
This is the output with -d9 for 'yum grouplist' (the 'yum remove' is also present at the bottom):

===============================================================================[root@hedayat-lap hedayat]# yum -d9 grouplist --disableplugin=local,langpacks,yum-fast-downloader
Not loading "blacklist" plugin, as it is disabled
Loading "presto" plugin
Loading "refresh-packagekit" plugin
Not loading "whiteout" plugin, as it is disabled
Running "config" handler for "presto" plugin
Config time: 0.036
Yum Version: 3.2.29
COMMAND: yum -d9 grouplist --disableplugin=local,langpacks,yum-fast-downloader 
Installroot: /
Setting up Group Process
Getting group metadata
file:///media/Parsidora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Parsidora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/Fedora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Fedora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
Trying other mirror.
Getting group metadata
file:///media/Parsidora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Parsidora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/Fedora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Fedora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: parsidora-dvd. Please verify its path and try again
===============================================================================

And 'yum remove' output:
===============================================================================
[root@hedayat-lap hedayat]# yum -d9 --disableplugin=local,langpacks,yum-fast-downloader remove texlive-luapersian
Not loading "blacklist" plugin, as it is disabled
Loading "presto" plugin
Loading "refresh-packagekit" plugin
Not loading "whiteout" plugin, as it is disabled
Running "config" handler for "presto" plugin
Config time: 0.037
Yum Version: 3.2.29
COMMAND: yum -d9 --disableplugin=local,langpacks,yum-fast-downloader remove texlive-luapersian 
Installroot: /
Ext Commands:

   texlive-luapersian
Reading Local RPMDB
rpmdb time: 0.000
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package texlive-luapersian.noarch 0:2010-5.0.1.svn23576.fc16 will be erased
Checking deps for texlive-luapersian.noarch 0:2010-5.0.1.svn23576.fc16 - e
--> Finished Dependency Resolution
Dependency Process ending
file:///media/Parsidora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Parsidora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/Fedora%2015%20x86_64%20DVD/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/Fedora 15 x86_64 DVD/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/cdrom/repodata/repomd.xml
Trying other mirror.
file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: parsidora-dvd. 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 --nodigest
===============================================================================

Comment 3 James Antill 2011-10-18 15:26:10 UTC
 I can't reproduce any of this with upstream, but I don't remember fixing either bug since F15.

1. yum remove doesn't access any repos. at all.

2. skip_if_unavailable works when I run group list.

 You could try the rawhide rebuild repo:

http://repos.fedorapeople.org/repos/james/yum-rawhide/fedora-yum-rawhide.repo

...and see if that fixes it (very close to upstream).

Comment 4 Hedayat Vatankhah 2011-10-18 18:07:41 UTC
I confirm that the bug is fixed in rawhide version of yum for both grouplist and remove. :)

Comment 5 Fedora Admin XMLRPC Client 2012-04-27 15:40:39 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


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