Red Hat Bugzilla – Bug 460782
RFE: Commands shouldn't fail for non-root with empty yum cache
Last modified: 2014-01-21 18:06:11 EST
$ rpm -q yum
$ 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.
What's the bug here?
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.
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.
I doubt this one for F11
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.
This is now upstream.