You are not logged in.
Hello,
so I am running pacman -Syuw today, and a week later I would like to install/update my system to this very state, preferably even offline, instead of getting the then current one. Is there a way to accomplish this?
Thanks
Ede
Last edited by EdeWolf (2021-02-10 10:42:06)
Offline
Jin, Jîyan, Azadî
Offline
Thanks. In case that is the only answer, that implies, an offline update to a state already saved on my machine is not possible. As here we just connect to an older archive.
And sorry, I am aware by mistake I've taken the wrong forum, this of course should have gone into the pacman subforum.
Offline
Edit: a much better solution is proposed by seth below. I was stupid.
The problem with -Sywu and waiting for a week with actually installing packages is that you are doing -Sy without a complete -Su. That may easily lead to a partial upgrade. Aside from that, you may create a separate cache directory, let’s say “/path/to/cache” and then:
sudo pacman -Sywu --cachedir=/path/to/cacheThis will download all the packages to “/path/to/cache”, so you can then easily install them using pacman -U:
find /path/to/cache/ -type f -exec sudo pacman -U {} \+The problem of doing -Sy without a full -Su could be resolved with checkupdates from community/pacman-contrib, but unfortunately it has no option to set cache path. However, if you are sure that none of the new ackages were not downloaded before some date, you can:
sudo checkupdates -dThen, when an update is needed:
find "$PACMAN_CACHE" -type f -ctime -"$DAYS" -exec sudo pacman -U --needed {} \+However, in this case you are playing the guessgame of whether all the required files are in the right time range.
Last edited by mpan (2021-02-10 09:56:13)
Offline
# pacman -Syuw
do nothing
do nothing again
more of nothing
# pacman -SuYou update the database and fill the cache w/ the required packages, but don't install them.
Then, in a long long future in a galaxy far far away, you just update the system (but not the database) which will use the previously cached packages (as they match the current database requriements) - provided you didn't wipe the cache and it's big enough to hold all packages.
Edit: spent too much time on the starwars reference…
Last edited by seth (2021-02-10 09:34:32)
Online
Now I feel stupid. xD
Last edited by mpan (2021-02-10 09:55:43)
Offline
@seth: Thanks, so far that was the most polite way of saying rtfm, I have come across:
-y, --refresh
Download a fresh copy of the master package database from the server(s) defined in pacman.conf(5). This should typically be used each time you use --sysupgrade or -u. Passing two --refresh or -y flags will force a refresh of all package
databases, even if they appear to be up-to-date.Basically, just leave -y away. Have not tested it, but I believe that does exactly what I want it to do. That is the price of years of automatic, thoughtless use of Syu.
May patience [and forgiveness] be with you. Always.
@mpan: That will be my fallback strategy in case I've misunderstood seth.
Thanks all again
Offline
@mpan: That will be my fallback strategy in case I've misunderstood seth.
I believe you understood correctly, but Seth was just answering your question as it was asked. Mpan was highlighting why that can be dangerous. Note Seth's solution includes many lines of "do nothing" - if that's what you do, then that solution is correct, but you must do nothing with pacman in that intervening time: any attempt to install any new package can (and most likely will) result in problems.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks Trilby. I did a small test and the answer of seth has been spot on - installing a known state without renewed updating. I am aware I should not touch pacman in between, but in fact, that is the whole intention: freeze a system (packagewise) for a certain period of time.
Offline