Zypper dup && flatpak

I have never been able to work out how to create a post hopefully this is right
In one of the posts I see Keyran use zypper dup && flatpak update
I have never seen this way to update
Is that safe?
Is Flatpack the same as Discover?
I do know to go to ctrl+alt F4 to do updates
Thanks
Vic

The && is simply making the commands run as a batch. For zypper you would need sudo zypper though.

Sorry, wrong.
&& between two commands means that the second command is only run if the first command gives a return code of 0 (which in general means that the process ended without any errors).

I have no idea why the originator of this zypper dup && flatpak command does it this way. It seems to imply that when the zypper dup does have problems, the flatpak should not run (for whatever reason).
But I assume you better ask the originator of this command line, why he designed it the way it is.

I also have no idea what flatpak is or does, but again you have to ask the originator or try to find some documentation about it (hey, we do have search engines on the Internet).

As already said zypper dup should be "run as root " (but no “need” to you sudo for that, use your preferred way). Again I have no idea if flatpak should be "run as root ".

@AussieOldGuy Correct quoting…so important!!!

It is sudo zypper dup && flatpak update

zypper dup is used to upgrade rpm packages on openSUSE products (mainly Tumbleweed/Slowroll).
flatpak update is used to upgrade flatpaks.

Both are the intended tools/commands to safely upgrade the different package formats. If you don’t use flatpaks, you don’t need the second command…

1 Like

Which indeed looks very different from what the OP posted.
But as the OP stated

people here thought he might be confused by the && and thus tried to explain it and either in the stumbled form as posted or in the form as the command apparently should have been posted the meaning of the && in bash is a “control operator” and is further defined in the description:

AND and OR lists are sequences of one or more pipelines separated by the && and || control operators, respectively. AND and OR lists are executed with left associativity. An AND list has the form

command1 && command2

command2 is executed if, and only if, command1 returns an exit status of zero.

An OR list has the form

command1 || command2

command2 is executed if and only if command1 returns a non-zero exit status. The return status of AND and OR lists is the exit status of the last command executed in the list.

1 Like