Home_greyopenFATE - openSUSE feature tracking > #305624
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

Allow downloading all packages before installing

Feature state

openSUSE-11.2
Done

Description

Libzypp should allow to set a policy to first download all packages and afterwards install all packages at once.

It should be considered whether to enable this policy under some scenarios (e.g. makes sense for online update, but not for distro installation)

Relations

References

https://bugzilla.novell.com:443/show_bug.cgi?id=448040

Discussion


icons/user_comment.png S. V. wrote: (8 years ago)

I see this as a pre-requisite for in running-system distribution upgrade reliability.

icons/user_comment.png R. D. wrote: (8 years ago)

Could this be better achieved by some general package cache-ing tool that can serve a LAN, providing packages from HDD, DVD or http/ftp download as appropriate?
Upgrading by making a local copy of all packages in somewhere like /var/cache is going to explode disk space requirements. If the disk is nearly full, then both throughput and fragmentation worsen.
In degenerate case of single PC LAN, the server can be run locally, which might ease the opposite policy of pipelining downloads to accelerate install speeds when most rpm's are available locally, but some need an update downloaded.

icons/user_comment.png R. M. wrote: (8 years ago)

It could be, but here is the word about download of packages involved in update before attempt to install them. It is just about improvement of current workflow where some packages are already installed when come to download error. This can have unwanted consequences to system, or applications. In some scenarios it can render system unbootable, in other package management will be rendered inoperational.

In any case to improve dependability of package management first download, then install is needed feature.

icons/user_comment.png R. D. wrote: (8 years ago)

I understand, but breaking the problem up, would make the logic simpler, and be more flexible for other requirements, permit interleaving of bandwidth & cpu limitted operations in parallel.
Even downloading first, doesnt' guarantee a needed package, will be installable, unless you check all the signatures etc.
Really the reliable update problem, requires installing a package set as a transaction, download first just avoids 1 class of errors, but if it's implemented naively could cause problems for other ppl.

icons/user_comment.png M. T. wrote: (8 years ago)

I agree completly with you.

icons/user_comment.png D. v. wrote: (8 years ago)

Agreed.
I've broken my system once before with a dist-upgrade. Half way the mirrors couldn't provide some packages (probably just got a buildrev-upgrade) and I got stuck with an half-upgraded system. Had to boot from CD, get the system bootable again and do rpm magic to find all packages which weren't upgraded.

This just shouldn't happen, and downloading all packages first should fix it too. Nowadays I always do a dist-upgrade from DVD as workarround.

icons/user_comment.png S. V. wrote: (8 years ago)

A suggestion on openSUSE-factory mailing list was to continue downloading all packages, deferring the errors until all that are donwloadable are indeed on the disk.

icons/user_comment.png J. E. wrote: (8 years ago)

Both modes should be supported. Install-as-downloaded (like it does today) for space-contrained systems, and install-after-download for where there is enough space and/or the user enabled it.

icons/user_comment.png J. M. wrote: (8 years ago)

I agree; (in addition to space-constraints), may also be relevant in places that have limited/time-based Internet connectivity. For those who (and many users don't require this) do not want/need latest desktop effects, etc; it would make sense to have a cache (locally) of executables (RPM's), that can be saved to backup medium (network server, CD/DVD, etc) once a stable working system configuration is obtained.
This can be used as a 'local repo' for system file updates as well as software (program) RPM's (similar to how the install DVD is listed as a repo source).

For those that prefer to do or don't mind periodic Internet updates, they can disable the former option.

icons/user_comment.png P. B. wrote: (8 years ago)

You may note that this is how smart does it: it first downloads all the required packages to disk (into /var/cache/smart/packages/) and then applies the updates in a single RPM transaction, without resorting to --nodeps.

Also, when the transaction fails, it leaves the downloaded packages into the cache directory. And obviously picks them up from there when available, and doesn't download them again.
There is an explicit command ("smart clean") to clean up the cache directory.

icons/user_comment.png R. D. wrote: (8 years ago)

smart is great in this feature but lacks other robust features : like when i tried to install the new version of amarok with smart , it downloaded the packages but when instaling said that there is a conflict of file between an installed package and one of the installing packages . i tried it with yast and it went smoothly.

maybe  yast ignores this minor file conflicts? :)

but i agree that a download and install later feature (or at list an option to do so before installing ) would be great , especialy now that there is many mirror problems and that yast sticks to one mirror for every repository and retring ,doesnt change the mirror to a better one .

icons/user_comment.png P. P. wrote: (8 years ago)

Oh, yast/zypper
do  use fallback mirrors meanwhile. Implemented in Factory/11.2, they use metalinks. Check
this link . Any testing would be welcome.

icons/user_comment.png R. D. wrote: (8 years ago)

i tried updating zypp (to test it in 11.1) and it required  updating yast2-* packages so i did but now yast software manager and repositoties don't work

what should i do?

icons/user_comment.png R. D. wrote: (8 years ago)

actually none of the yast modle work

i click on them but nothing happens

icons/user_comment.png P. P. wrote: (8 years ago)

You have two options.
Report a bug  or post to the
zypp-devel mailing list . Just a note - please keep this feature tracking tool issue clean, in particular because it is about an entirely different subject. Thanks!

icons/user_comment.png C. M. wrote: (8 years ago)

A problem with the current Install-as-downloaded system is that rpm needs to be executed with "--replacefiles" (or something equivalent). See http://bugzilla.novell.com/411574

An install-after-download system should behave like Smart, checking first if there two packages trying to own the same (but different) file.

icons/user_comment.png G. D. wrote: (8 years ago)

I  agree with comment #11  - Cristian. It also needs to handle interrupted downloads - resume them as necessary.

icons/user_comment.png S. L. wrote: (8 years ago)

And something like AptonCD of Ubuntu ?

icons/user_comment.png a. f. wrote: (8 years ago)

i began to work on it:

that's my zypperonDVD

http://pastebin.com/f770b3398

icons/user_comment.png M. A. wrote: (8 years ago)

libzypp-6.11.0 allows to set different download policies in ZYppCommitPolicy (DownloadOnly, DownloadInAdvance, DownloadInHeaps, DownloadAsNeeded).

icons/user_comment.png M. V. wrote: (7 years ago)

zypper-1.2.3 (in home:mvidner, SRI 19048 to zypp:Head) implements --download-only.

icons/user_comment.png M. A. wrote: (7 years ago)

Jano: Will there also be options in zypper to choose the other download policies (inAdvance, inHeaps, asNeeded)?

icons/user_comment.png . . wrote: (7 years ago)

/etc/zypp/zypp.conf:

## Commit download policy to use as default.
##
##  DownloadOnly,       Just download all packages to the local cache.
##                      Do not install. Implies a dry-run.
##
##  DownloadInAdvance,  First download all packages to the local cache.
##                      Then start to install.
##
##  DownloadInHeaps,    Similar to DownloadInAdvance, but try to split
##                      the transaction into heaps, where at the end of
##                      each heap a consistent system state is reached.
##
##  DownloadAsNeeded    Alternating download and install. Packages are
##                      cached just to avid CD/DVD hopping. This is the
##                      traditional behaviour.
##
##  <UNSET>             If a value is not set, empty or unknown, we pick
##                      some save default.
##
commit.downloadMode = DownloadInAdvance

icons/user_comment.png . . wrote: (7 years ago)

...bad text formatting...

## Commit download policy to use as default.

##  DownloadOnly,       Just download all packages to the local cache.

##  DownloadInAdvance,  First download all packages to the local cache.

##  DownloadInHeaps,    Similar to DownloadInAdvance, but try to split

##  DownloadAsNeeded    Alternating download and install. Packages are

icons/user_comment.png J. K. wrote: (7 years ago)

I wish i could say they will, but i'm pretty busy with other things. And we're already pretty close to the 11.2 GM. I will still try to add them, though.

icons/user_comment.png J. K. wrote: (7 years ago)

this was done as part of FATE #302159

icons/user_comment.png R. U. wrote: (7 years ago)

I see this is the workaround: zypper ref && zypper dup -d && zypper -v dup

icons/user_comment.png J. K. wrote: (7 years ago)

yes, exactly.

Last change: 7 years ago
Voting
Score: 125
  • Negative: 3
  • Neutral: 5
  • Positive: 128
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint