You are not logged in.
It's fairly easy to run pacman -Syu as a cronjob. There's even [a thread](https://bbs.archlinux.org/viewtopic.php?id=1307) about it. However, the thread doesn't go into much detail on why this is bad. I'm fairly new to linux, but as a gut instinct doing this feels like it could cause issues. I just don't know what issues. Could someone enlighten me?
Last edited by ArcWand (2023-03-03 03:53:16)
Offline
1. It removes the agency and responsibility of the user from the update process. This isn't Windows.
2. It will break when pacman asks you to make a decision [Y/N] or when user intervention is required (rare, but it happens).
3. Why would you do it anyway? Is your life that busy that you don't have time to pay attention to what is happening on your machine(s)?
Offline
What are the benefits? There are far too many downsides to list.
Offline
Hard agree on "Why would you even want this". If you're just trying not to wait for packages to download try using checkupdates, there's hardly any legitimate reason to actually to to install packages unattended though.
Offline
The idea behind this is pretty simple and probably more than a little dumb: I'm very forgetful; too often, I've had software break because I hadn't updated in too long. So, an automatic update every other week or so would fix that.
Pacman asks me for [Y/n] at least once per run. It's bypassable by piping `yes y` into the pacman command.
Vorvac, I'm not sure how the wiki page linked explains the downsides?
Offline
1. Unattended upgrades cannot consider manual intervention news.
2. Unattended upgrades cannot deal with .pacnew files.
3. Unattended upgrades cannot reliably restart running processes or services that use the upgraded binaries, libraries, configs, unit files, etc. which were replaced. Mixing these at runtime is definitely asking for trouble.
4. Unattended upgrades cannot review pacman transactions, which is a moderate security risk.
5. Unattended upgrades may require a reboot, such as in the case of removed kernel modules. This is true of regular upgrades but you have the option to defer them by declining the proposed updates.
And, again, you have the option to just never update. In that case all your software will continue to operate the same as it has the day before, and the day before that. I have no idea what spontaneous breakage you're thinking of, but it is just is not a real concern. If you run periodic unattended upgrades I can promise you you will encounter spontaneous and difficult to identify issues. It just isn't that much work to look at a list of packages and consider what the consequences of the upgrade are.
Offline
The idea behind this is pretty simple and probably more than a little dumb: I'm very forgetful; too often, I've had software break because I hadn't updated in too long. So, an automatic update every other week or so would fix that.
Or, you could just display any pending updates in your status bar...
Pacman asks me for [Y/n] at least once per run. It's bypassable by piping `yes y` into the pacman command.
This is an idea that is so stupendously stupid. What happens when pacman recommends [y/N]?
Offline
Thank you to every one who responded! Definitely many reasons to not do this!
Offline
<EDIT>
See Brocellous' #10 and #14 posts
See Trilby's post #15
</EDIT>
You'd maybe want some help by automating the download phase: -Syuw. Did you consider it?
Last edited by d.ALT (2023-03-03 17:14:30)
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
-Syuw. Did you consider it?
Not if you ever want to use pacman -S. Use checkupdates -d instead.
Offline
d.ALT wrote:-Syuw. Did you consider it?
Not if you ever want to use pacman -S
I'm missing this, can you please help me understand?
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
Every invocation of -Sy refreshes your dbs, meaning -S $pkg could introduce a partial upgrade. If any $dep of $pkg has been updated in the repos since your last -Su you won't have the correct version of $dep present for $pkg.
Offline
If any $dep of $pkg has been updated in the repos since your last -Su
So... Problem here it's the time delay which will occour between download-only (-Syuw) and actual upgrade (-Syu), am I understanding right?
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
Yes, it's because the refresh and upgrade happen at different times. Frequent -Syuw in the background means your syncdb is usually more up to date than your installed packages. checkupdates uses a separate syncdb to check for updates in order to keep your real syncdb in sync with your real system.
Offline
Problem here it's the time delay which will occour between download-only (-Syuw) and actual upgrade (-Syu), am I understanding right?
Not really. You can download package files to your hearts content and delay as long as you want until using them in an upgrade, or never use them at all. The problem is the delay between syncing your local dbs (the -y flag) and installing the packages in that version of the dbs. It's the very definition of a partial upgrade.
On the main topic though, some ideas are so bad it's just futile trying to list all the different ways it could do harm. Some good examples have been provided, but that's not nearly an exhaustive list. Many of the breakage that could result from unatended updates may not even be able to be predicted. Even the process of trying to list all the ways this could go wrong is a perfect example of the second dumbest idea in computer security. Even if you were to think all the problems we could list wouldn't be an issue for you that would not mean it was safe or wise to go ahead with unattended updates.
Last edited by Trilby (2023-03-03 14:07:06)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've had software break because I hadn't updated in too long. So, an automatic update every other week or so would fix that.
Vorvac, I'm not sure how the wiki page linked explains the downsides?
The page I linked to describes how pacman handles configuration files when upgrading packages. If you are worried about software breaking from lack of updates, automating pacman -Syu won't solve your problem -- as you haven't prevented software from breaking due to updates.
Last edited by vorvac (2023-03-03 16:17:50)
Offline