Bug 1294820 - dnf download doesn't work with --cacheonly
dnf download doesn't work with --cacheonly
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-30 08:48 EST by Jan Včelák
Modified: 2016-11-25 15:10 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-25 15:10:00 EST
Type: Bug
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 Jan Včelák 2015-12-30 08:48:11 EST
Description of problem:

Running 'dnf -C download' as a non-privileged user doesn't work. The command first downloads the package into the cache which is read-only for a regular user. Then the file is copied from the cache to the desired location.

Downloading the package into the cache makes a little sense, because the package is downloaded no matter if the file is already in the cache.


Version-Release number of selected component (if applicable):
dnf-plugins-core-0.1.15-1.fc23.noarch

How reproducible:
always

Steps to Reproduce:
1. $ sudo dnf clean all
2. $ sudo dnf makecache
3. $ dnf -C download --destdir /tmp bash

Actual results:
Last metadata expiration check performed 1:49:19 ago on Wed Dec 30 12:57:05 2015.
[Errno unknown] Cannot open /var/cache/dnf/fedora-fe3d2f0c91e9b65c/packages/bash-4.3.42-1.fc23.x86_64.rpm: Permission denied: 'Input/Output error

Expected results:
bash package is downloaded into /tmp


Additional info:
Comment 1 Jaroslav Mracek 2016-01-06 07:13:17 EST
It try to use cache from root (/var/cache/dnf/) instead of user's cache (/var/tmp/dnf-USER-hash/). We will try to fix it.
Comment 2 Jaroslav Mracek 2016-01-06 07:30:52 EST
Small correction, I think it try to write down the downloaded rpm but into root's directory /var/cache/dnf/fedora-fe3d2f0c91e9b65c/packages/ where non-privilege user doesn't have access. The problem only appear when --destdir option is used. The cache is used correctly.
Comment 3 Jaroslav Mracek 2016-01-06 07:36:35 EST
Another correction: The problem only appear when -C option is used and it is not connected with --destdir option.
Comment 4 Fedora Admin XMLRPC Client 2016-07-08 05:25:17 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2016-11-24 09:35:43 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Jaroslav Mracek 2016-11-25 15:10:00 EST
The presented problem cannot be reproduce with dnf-2.0. 

Steps that do not reproduce:
1. $ sudo dnf clean all
2. $ dnf clean all
3. $ dnf makecache
4. $ dnf -C download --destdir /tmp bash

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