Getting zypper to download before installing

I am sorry if this is obvious, but one of the listed features of openSUSE 11.2 is:

“Ability to download all software first before installing it.”

I have looked around but cannot figure out how to get zypper to do this. Also is there a way to get yast software management to install packages like this?

Any help is appreciated, Thanks!

Let’s say you were doing update:

zypper up -d

will download the updates

then

zypper up

Be careful with this if you have limited disc space on root

To make YAST / zypper both (without any kludges) download files in advance you will need to edit zypp.conf by hand (I’m not sure if there is a GUI way but I always do it manually).

Edit (as root) /etc/zypp/zypp.conf and find this:

##
## 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 =

Now remove the ##'s in front of it and add the DownloadInAdvance parameter so it’ll look like this:

##
## 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

Save the file and ad the changes will take effect immediately. Packages will now download in advance to being installed - it will have an effect on both zypper and yast.

However it has a small bug (nothing critical, only cosmetic) where during installing the packages it has downloaded in advance it will go over the overall package number and appear to “do it all twice”. This is merely cosmetic and it is infact not downloading them again but “downloading” them from the temporary directory to install. As I said, this is a merely cosmetic bug and you should ignore it.