Description of problem: I am working on a script for downloading of custom packages identified by file names. When I call dnf.Base.fill_sack() I get the following exception: File "/usr/lib/python2.7/site-packages/dnf/base.py", line 216, in fill_sack self._sack.load_system_repo(build_cache=True) IOError: Failed writing the cache. Radek Holy advised me to set base.conf.cachedir to a pathe where I have write rights. I think DNF should configure base.conf.cachedir on its own, because I as an application developer don't want to care about such things. Aas a bonus, all DNF API consumers would use the same cache.
*** Bug 1062180 has been marked as a duplicate of this bug. ***
Follow-up: I set base.conf.cachedir to '/var/tmp/jfilak_dnf_donwloader/' and I got the following exception: Traceback (most recent call last): File "dnf_debuginfo.py", line 38, in <module> download_debuginfo() File "dnf_debuginfo.py", line 26, in download_debuginfo base.fill_sack() File "/usr/lib/python2.7/site-packages/dnf/base.py", line 222, in fill_sack self._add_repo_to_sack(r.id) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 98, in _add_repo_to_sack repo.load() File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 772, in load self._replace_metadata(handle) File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 623, in _replace_metadata dnf.util.ensure_dir(self.cachedir) File "/usr/lib/python2.7/site-packages/dnf/util.py", line 63, in ensure_dir os.makedirs(dname, mode=0o755) File "/usr/lib64/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/cache/dnf/updates-debuginfo' Is there something wrong on these lines? base.conf.cachedir = "/var/tmp/jfilak_dnf_donwloader" base.fill_sack()
(In reply to Jakub Filak from comment #2) > > Is there something wrong on these lines? > base.conf.cachedir = "/var/tmp/jfilak_dnf_donwloader" > base.fill_sack() Yes, the function calls are in a bad order. All my calls: base.read_all_repos() base.conf.cachedir = "/var/tmp/jfilak_dnf_donwloader" base.fill_sack() The correct order: base.conf.cachedir = "/var/tmp/jfilak_dnf_donwloader" base.read_all_repos() base.fill_sack() Thank you, Radek Holy!
*** Bug 1188186 has been marked as a duplicate of this bug. ***
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 then log in and leave karma (feedback).
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.