Do you have an example of a problem that wouldn't be detected by pacman that could be detected by a user who ran those two commands sequentially?
Sure: sometimes during a kernel update, mkinitcpio will fail one of the hooks (lvm2 being the usual culprit for me). pacman returns 0 in these cases. I just checked my log, so I'm sure about this. What I did in the past is reinstall the kernel or rerun mkinitcpio, and this has always worked, but had I tried to reboot immediately, I would have found my installation unbootable.
To answer the OP, yes, pacman -Syu && reboot is a bad idea. On the contrary, there is no excuse for not carefully reading pacman's output after every update.
In summary:
VERSION INATTENTIVE USER ATTENTIVE USER
&& version: unsafe unsafe
separate: unsafe mostly safe
senjin wrote:Pacman -Syu can leave system in a state, that makes system unable to boot
But you won't know that unless you reboot correct?
Maybe I will, if I realise from the pacman output.
So if you issue the command to reboot immediately or issue it separately, it doesn't matter in your example.
Exactly. So the point is to give user chance to not reboot immediately.
A bug in a post install script would make the pacman command return non-zero.
Only if it's a syntax bug.
VERSION INATTENTIVE USER ATTENTIVE USER
&& version: mostly safe mostly safe
separate: unsafe mostly safe (no more so than above) [1]
OK, here I agree, except of [1]. Unless you have a very good argument, that pacman -Syu can't do bad things and still return 0 under any conditions.
]]>Any error that would be presented to the user at the command line would also make the command return non-zero.
Given this, I actually find the && version much safer than telling a user to do
pacman -Syu
reboot
as separate commands. I trust the computer to follow the meaning of the && instructions much more than I trust the average user to pay attention to pacman's output.
Anything that would be missed by the && version, would also be missed by even the most attentive and responsible user as pacman would not give any notice of an error.
So, in summary:
VERSION INATTENTIVE USER ATTENTIVE USER
&& version: mostly safe mostly safe
separate: unsafe mostly safe (no more so than above)
Pacman -Syu can leave system in a state, that makes system unable to boot
But you won't know that unless you reboot correct?
So if you issue the command to reboot immediately or issue it separately, it doesn't matter in your example.
]]>Example? What about bug in post_install script? Or bug in a package that some part of upgrade relies on, which is not realised by the developer, because he used fixed version?
]]>pacman -Syu && reboot
It looks like a bad advice to me. If pacman fails in the middle of upgrade, immediate reboot can make bad things much worse. And pacman can fail, in particular because the problems can come not only from pacman itself, but also from a bad package. It happened several times before. I believe it's not safe to assume everything will go fine with "pacman -Syu".
Edit: ok, now I realized "&&" will prevent rebooting in most "fail" situations, but still I'd feel uneasy typing such command.
]]>