Bug 460782 - RFE: Commands shouldn't fail for non-root with empty yum cache
RFE: Commands shouldn't fail for non-root with empty yum cache
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-31 15:17 EDT by Ville Skyttä
Modified: 2014-01-21 18:06 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-21 13:21:10 EST
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 Ville Skyttä 2008-08-31 15:17:03 EDT
$ 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 15:36:18 EDT
What's the bug here?
Comment 2 Ville Skyttä 2008-08-31 16:16:01 EDT
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 17:52:50 EDT
 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 13:48:30 EST
I doubt this one for F11
Comment 5 James Antill 2009-01-21 16:34:31 EST
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 13:21:10 EST
This is now upstream.

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