Red Hat Bugzilla – Bug 758574
Permission denied error on 'yum search -C' by unprivileged user
Last modified: 2014-03-16 23:29:27 EDT
Description of problem:
$ yum search -C jabber
Loaded plugins: langpacks, presto, refresh-packagekit
[Errno 13] Permission denied: '/var/cache/yum/x86_64/16/fedora/8e5f7c264cbd50659a18cd4f87fe75ea728fdc187d4e5e041898070c9dccf5e8-comps-f16.xml'
$ ls -l /var/cache/yum/x86_64/16/fedora/ -lZ
-rw-r--r--. root root unconfined_u:object_r:rpm_var_cache_t:s0 8e5f7c264cbd50659a18cd4f87fe75ea728fdc187d4e5e041898070c9dccf5e8-comps-f16.xml
'yum search' without the -C option works fine. Also, this used to work on F15. After the upgrade to F16, this stopped working.
*** Bug 749239 has been marked as a duplicate of this bug. ***
(In reply to comment #1)
> *** Bug 749239 has been marked as a duplicate of this bug. ***
Doesn't look like 749239 is a dup of this one?
749239 is a bug in error handling of this bug, but really a separate issue. Reopened that- sorry for the notification noise.
just don't use the -C option?
given how caching and user-local copies of the repodata have evolved -C is not very much needed
(In reply to comment #4)
> just don't use the -C option?
> given how caching and user-local copies of the repodata have evolved -C is not
> very much needed
Without -C, the metadata is downloaded each time, even if the root user had recently downloaded all the metadata.
If things aren't supposed to work this way, maybe some config change is needed, (this is an installation that's been upgraded from previous releases, not a new install)?
This bug is caused by different handling of group_gz metadata files in Yum and Yum-langpacks. Yum downloads and keeps the .gz file, opening it with gzip.open(). But Yum-langpacks tries to decompress it to the same (often rdonly) directory. Possible fixes are:
a) change yum such that it prefers .gz file for download but unpacks it immediately after the download.
b) change yum-langpacks to use in-place decompression.
Without -C it's not downloaded each time. For the user it is copied from the most recent copy of the systemwide yum cache. If that copy is current enough then it is used, if not new one is fetched.
(In reply to comment #7)
> Without -C it's not downloaded each time. For the user it is copied from the
> most recent copy of the systemwide yum cache. If that copy is current enough
> then it is used, if not new one is fetched.
OK, I can confirm this behaviour.
However, I'd like for -C to exist.
1) when I'm on mobile broadband, I just want to query the db for a particular package or look up its info. In that case, I don't want to use up any bandwidth or incur charges just for querying the db.
2) When I get an rpm from some source (e.g. latest kernel from koji), I want to just 'yum install -C ./kernel*.rpm' without having to fetch latest metadata.
I think this should be fixed in langpacks.py, patch added.
Created attachment 547184 [details]
Use the already decompressed comps file.
Thanks, applied to git.
yum-langpacks-0.2.4-2.fc16 has been submitted as an update for Fedora 16.
yum-langpacks-0.2.4-2.fc15 has been submitted as an update for Fedora 15.
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-langpacks-0.2.4-2.fc15'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
yum-langpacks-0.2.4-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
yum-langpacks-0.2.4-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.