You are not logged in.

#1 2015-09-09 22:44:28

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

SOLVED: What's the install-time parallel of --download-only?

I'm reading there is a pacman option:

       -w, --downloadonly
           Retrieve all packages from the server, but do not install/upgrade anything.

Once I have done that, and new packages have been downloaded, how do I install them (but not anything else?)

If I usually do:

pacman -Sy
pacman -Su

I could do instead

pacman -Sy
pacman -Sw
pacman -Su

and it would have the same effect, except that the -Su would be a lot faster because the download was done already? And if I do

pacman -Sy
pacman -Sw
sleep for a bit
pacman -Sy
pacman -Su

then the pacman -Su will download the packages changed since the sleep, but use the already-downloaded ones if not changed since the sleep? Or is there some other command to install the already-downlaoded ones?

I guess I'm missing a state machine.

Last edited by jernst (2015-09-10 20:49:22)

Offline

#2 2015-09-09 23:02:38

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: SOLVED: What's the install-time parallel of --download-only?

Make it simple for yourself, Just run pacman -Syuw  .
It will ask you the same questions as pacman -Suy , so if there are replaces it will download only what's needed into cache.

Once you got time to install , run pacman -Syu . It will download things that are not present in cache.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2015-09-10 10:05:15

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: SOLVED: What's the install-time parallel of --download-only?

The important state consists of the local copies of the package databases. You update these with the -y flag for the sync (-S) operation.

jernst wrote:

If I usually do:

pacman -Sy
pacman -Su

I could do instead

pacman -Sy
pacman -Sw
pacman -Su

and it would have the same effect, except that the -Su would be a lot faster because the download was done already?

Close, but not quite. Apparently you didn't try it:

# pacman -Sw
error: no targets specified (use -h for help)

Normally you would do

# pacman -Syu

If you want to do the same thing, but download first and install later, you do

# pacman -Syuw

to synchronize the database, select all updates as targets and download them (without installing). Then later you do

# pacman -Su

to use the state from the last package database synchronization, installing all updates available at that time (which have already been downloaded). I think that you will get the same questions about replacement twice, but that you could use --noconfirm if you were happy with the default choices during the download-only step (use with care).

Or as Lone_Wolf says, you can add another -y to the second step to pull in any additional updates since the download-only step. You can't do that while you're offline, but probably still have most of the packages cached, so it should be faster.

Last edited by Raynman (2015-09-10 10:06:31)

Offline

#4 2015-09-10 20:49:02

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: SOLVED: What's the install-time parallel of --download-only?

Thank you. I was working from the man page; it perhaps could use a few extra sentences.

Offline

Board footer

Powered by FluxBB