Bug 1048433 - RFE --downloadonly
RFE --downloadonly
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
: 1241217 1260279 (view as bug list)
Depends On:
Blocks: 1203491
  Show dependency treegraph
 
Reported: 2014-01-04 03:23 EST by Frank Murphy
Modified: 2015-10-05 17:52 EDT (History)
13 users (show)

See Also:
Fixed In Version: 0.0.8 dnf-1.1.2-4.fc23 dnf-1.1.2-4.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-04 15:13:27 EDT
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 Frank Murphy 2014-01-04 03:23:54 EST
Description of problem: For central or local downloading of rpms, 
No download only

nfs shared cache (my setup)
currently I do on the download box:
yum install $(cat fedora_boxes_list) --downloadonly # or something similar
Comment 1 Ales Kozumplik 2014-01-06 02:39:53 EST
related: bug 1045679.

for the orthogonality's sake we will try to end up with only one of the options implemented (I lean towards --downloadonly as it's more 'core' thing).
Comment 2 Tim Lauridsen 2014-04-29 01:45:33 EDT
Hi Frank

Does this solve your needs
http://dnf-utils.readthedocs.org/en/latest/command-ref.html#dnl-command


Use these command to test the tool:

sudo dnf copr enable timlau/dnf-utils
sudo dnf install dnf-utils

The plan is move the tool into dnf-plugins-core when ready
Comment 3 Tim Lauridsen 2014-06-02 03:44:41 EDT
download command is added to dnf-plugins-core-0.0.8, available in fedora updates

http://dnf-plugins-core.readthedocs.org/en/latest/download.html
Comment 4 Radek Holy 2015-07-10 05:33:45 EDT
Frank did it solve your problem? I think that it is not easy to maintain a shared cache with "dnf download". I believe that we should reopen this bug since there is a use case for --downloadonly which would be very difficult to achieve using "dnf download". But if "dnf download" is enough for you, I'll track the other use case in the other bug report.

I, also as Ales, think that --downloadonly is better than "dnf download". But unlike Ales, I believe that once we integrate DNF with CAShe, we will need both --downloadonly and "dnf download". (Maybe we can move the download plugin to dnf-plugins-extras then.)
Comment 5 Frank Murphy 2015-07-10 08:41:41 EDT
No it didn't solve a shared cache.
Currently even dnf download has disappeared during my upgrade F21>22.

rpm -qa | grep dnf
python-dnf-plugins-core-0.1.9-1.fc22.noarch
python-dnf-plugins-extras-local-0.0.8-1.fc22.noarch
dnf-1.0.1-2.fc22.noarch
python3-dnf-plugins-extras-repomanage-0.0.8-1.fc22.noarch
python3-dnf-plugins-core-0.1.9-1.fc22.noarch
python-dnf-plugins-extras-common-0.0.8-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.8-1.fc22.noarch
dnf-plugins-core-0.1.9-1.fc22.noarch
dnf-yum-1.0.1-2.fc22.noarch
dnf-conf-1.0.1-2.fc22.noarch
python3-dnf-1.0.1-2.fc22.noarch
python-dnf-1.0.1-2.fc22.noarch
python3-dnf-plugins-extras-common-0.0.8-1.fc22.noarch
dnfdaemon-0.3.8-1.fc22.noarch
dnf-langpacks-0.10.0-1.fc22.noarch
Comment 6 Radek Holy 2015-07-10 08:58:57 EDT
Thanks for the info.

I cannot reproduce it with the same package set. Note that the "download" plugin is part of "dnf-plugins-core". If "dnf download" does not work for you, please, file a bug.
Comment 7 Frank Murphy 2015-07-10 09:01:14 EDT
My mistake, I placed plugins=0 in dnf.conf for some testing last week & forgot about it. dnf download is there.
Comment 8 Radek Holy 2015-07-10 09:08:20 EDT
*** Bug 1241217 has been marked as a duplicate of this bug. ***
Comment 9 John Trickey 2015-07-16 15:30:50 EDT
I think there is some confusion lying around this bug and bugs 1209638, 1203491.
These seem to refer to downloading to a specific directory which does appear to be handled by the download plugin.

I have a very different use for --downloadonly option to circumvent problems on low speed links and links with peak time data caps.

I set a throttle and use "yum --downloadonly updates" run overnight from cron to preload the cache. This enables me at any time to run "yum update" without waiting for an eternity for a download or killing the user's data allowance.

Frankly this is a serious omission which is stopping me from upgrading some sites from Fedora 21 to 22.
Comment 10 Jan Zeleny 2015-07-17 04:07:56 EDT
(In reply to John Trickey from comment #9)
> I think there is some confusion lying around this bug and bugs 1209638,
> 1203491.
> These seem to refer to downloading to a specific directory which does appear
> to be handled by the download plugin.
> 
> I have a very different use for --downloadonly option to circumvent problems
> on low speed links and links with peak time data caps.
> 
> I set a throttle and use "yum --downloadonly updates" run overnight from
> cron to preload the cache. This enables me at any time to run "yum update"
> without waiting for an eternity for a download or killing the user's data
> allowance.
> 
> Frankly this is a serious omission which is stopping me from upgrading some
> sites from Fedora 21 to 22.

I am not sure why is that. From your description, running something like the following would solve your problem:

dnf download --resolve `dnf check-update | tail -n +3 | awk '{print $1}' | sed 's/\..*//'`
Comment 11 Radek Holy 2015-07-17 06:37:06 EDT
That's why I said that I also believe that we need both "dnf download" and "dnf --downloadonly". After integrating with CAShe I think that the use case for "dnf download" is simply to download given package from repositories for whatever reason. I mean, DNF is able to download packages so why not provide this feature to users as well. But it can easily live in dnf-plugins-extras. OTOH, the use case of downloading packages in advance or downloading packages in order to distribute them between different devices is crucial and for that, --downloadonly fits better IMO.

BTW, John, I think that "dnf-automatic" is a good choice for you (once we fix bug 1220074).
Comment 12 Chris Siebenmann 2015-07-17 10:53:09 EDT
Bug 1241217 covers this in more detail, but 'dnf download' followed by
'dnf upgrade *.rpm' is not exactly equivalent to a hypothetical 'dnf
upgrade --downloadonly' then 'dnf upgrade' operation. For example,
the dnf local plugin quite rationally does not trigger on installs or
upgrades of local RPMs.

(There are any number of operations that are hard to simulate through
'dnf download' and then some additional dnf operation; consider eg
'dnf --downloadonly --releasever 23 distro-sync' plus the following
'dnf --releasever 23 distro-sync'. I'm sure you can do it with a bunch
of work, but why should people have to write awk and sed pipelines here?)
Comment 13 John Trickey 2015-07-17 15:39:57 EDT
Jan, As Chris said, they are not equivalent. Take the instance where "dnf check-updates" produces a section "Obsoleting Packages". The result would be trying to download a package called Obsoleting plus the packages it was trying to obsolete. I tried it, here is the tail of the output:

.....
zsh.x86_64
Obsoleting
kernel-headers.x86_64
kernel-headers.x86_64
python-firewall.noarch
python2-firewall.noarch

It could be accomplished in a shell/perl/awk/... script but does it have to be that hard?

I also concur with Chris's point that we'd end up with a "local install" which might have undesirable consequences.

Radek, dnf-automatic is interesting but, call me old fashioned, I like to keep hold of a system while it is updating - experience tells me that's wise. Also, bug 122074 would impair --downloadonly as well as dnf-automatic.

I wouldn't have thought --downloadonly was hard to implement and it is so much more user friendly than the alternatives.
Comment 14 Radek Holy 2015-07-20 02:40:45 EDT
(In reply to John Trickey from comment #13)
> Radek, dnf-automatic is interesting but, call me old fashioned, I like to
> keep hold of a system while it is updating - experience tells me that's
> wise.

Well, I meant, you can configure it to just download the updates. Then you can invoke the upgrade manually with the updates being already downloaded (once we fix that bug).

>Also, bug 122074 would impair --downloadonly as well as dnf-automatic.

This probably is not the bug you meant.

> I wouldn't have thought --downloadonly was hard to implement and it is so
> much more user friendly than the alternatives.

No, it isn't hard to implement. As you can see above, the only reason for not implementing this is that we didn't want to duplicate the functionality. Ales probably originally didn't recognize this use case and since Tim already implemented the "download" plugin, it seemed that we are done. Now, it is clear that it is not true.
Comment 15 John Trickey 2015-07-20 10:02:02 EDT
(In reply to Radek Holy from comment #14)
> Well, I meant, you can configure it to just download the updates. Then you
> can invoke the upgrade manually with the updates being already downloaded
> (once we fix that bug).

Ah, not obvious from "dnf-automatic --help" but all comes clear with the dnf.automatic man page. Interesting that my usage is close to the distributed automatic.conf.

> >Also, bug 122074 would impair --downloadonly as well as dnf-automatic.
> 
> This probably is not the bug you meant.

Oops, dropped 0. I meant the same bug as you referenced, 1220074

I'll track that bug and play with it on a system that doesn't matter if the download fails
Comment 16 Radek Holy 2015-09-07 05:14:08 EDT
*** Bug 1260279 has been marked as a duplicate of this bug. ***
Comment 17 Fedora Update System 2015-09-22 11:01:20 EDT
hawkey-0.6.1-1.fc23 dnf-plugins-core-0.1.12-2.fc23 dnf-1.1.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
Comment 18 Fedora Update System 2015-09-22 11:03:16 EDT
dnf-plugins-core-0.1.12-2.fc22 hawkey-0.6.1-1.fc22 dnf-1.1.2-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
Comment 19 Fedora Update System 2015-09-22 23:54:48 EDT
dnf-1.1.2-2.fc23, dnf-plugins-core-0.1.12-2.fc23, hawkey-0.6.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugins-core dnf hawkey'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
Comment 20 Fedora Update System 2015-09-23 17:22:40 EDT
dnf-1.1.2-2.fc22, dnf-plugins-core-0.1.12-2.fc22, hawkey-0.6.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugins-core dnf hawkey'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
Comment 21 Fedora Update System 2015-10-02 11:19:57 EDT
dnf-plugins-core-0.1.12-3.fc23 hawkey-0.6.1-2.fc23 dnf-1.1.2-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
Comment 22 Fedora Update System 2015-10-02 11:24:15 EDT
dnf-plugins-core-0.1.12-3.fc22 hawkey-0.6.1-2.fc22 dnf-1.1.2-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
Comment 23 Fedora Update System 2015-10-03 21:35:53 EDT
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
Comment 24 Fedora Update System 2015-10-03 21:51:48 EDT
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
Comment 25 Fedora Update System 2015-10-04 15:12:38 EDT
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 26 Fedora Update System 2015-10-05 17:52:08 EDT
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

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