Bug 460782

Summary: RFE: Commands shouldn't fail for non-root with empty yum cache
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: ffesti, james.antill, katzj, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-21 18:21:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ville Skyttä 2008-08-31 19:17:03 UTC
$ rpm -q yum
yum-3.2.19-1.fc9.noarch

$ sudo yum --disableplugin="*" clean all
Cleaning up Everything

$ yum --disableplugin="*" resolvedep foo
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

Workaround is to populate yum's metadata cache as root, resolvedep as non-root works after that.

Comment 1 seth vidal 2008-08-31 19:36:18 UTC
What's the bug here?

Comment 2 Ville Skyttä 2008-08-31 20:16:01 UTC
The bug is:

> Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora.
> Please verify its path and try again

I think yum should just download the metadata somewhere in a temporary location where the current user can write, and work from that, like repoquery does.

Or output a more helpful error message, like "yum install foo" as non-root does, or at least include the path where it tried to write or read things in the error message (and say it's non-writable (if it's about writing), does not exist (if it's about reading), or output "permission denied" errors if applicable).

The current error message is not helpful and actually seems wrong to me; according to wireshark yum did not actually try to retrieve any repomd.xml.

Oh, I see that resolvedep is not at all alone with this problem, several other commands like search, info, etc are affected as well.

Comment 3 James Antill 2008-08-31 21:52:50 UTC
 All the commands do that, becuase yum doesn't call the code repoquery does it just uses what's available.
 In theory we could change that, but it's a pretty big change to make within 3.2.z ... and what repoquery etc. do still isn't always optimal atm.
 We might get around to doing this for Fed-11.

Comment 4 seth vidal 2009-01-21 18:48:30 UTC
I doubt this one for F11

Comment 5 James Antill 2009-01-21 21:34:31 UTC
I'm still hoping we can, but before I do it I want to fix the "move cached files from main" feature so it gets .sqlite files as well as .sqlite.bz2 ... saying that RHN doesn't work at all, so it's no deal breaker.

Comment 6 James Antill 2009-02-21 18:21:10 UTC
This is now upstream.