How should one update from the commandline?

@ karlmistelberger

It depends on Version, Requires etc…

But if I switch packages f. e. to packman, I do not want to switch them back…

See what @hui said in Post #17.

My message is about updating an openSUSE Tumbleweed system. What you think you should install and maintain outside the openSUSE Tumbleweed system maintenance is of your business. I think you might understand now That I do not advice to mix many different and unrelated actions into one big statement. I also tried to tell you that the question what you should do is not likely to be answered. The most you will get is advice based on what others do and what others think as being good practices. And I guess that those others have together more then 100 years (no exaggeration) of experience in maintaining Unix/Linux systems. You should try to extract things that you think are good advice and then try to implement that.

I hope you understand by now that many, including me, try to tell you that you should NOT do updates “automatic”. Follow that advice or not, it is your system.

And I can not find any mentioning in this thread of script -a above.

Sorry, for the system there is no “Myself”. The system only knows UIDs with attached user names. Most important here is if it is root or a “normal user” that is doing things.
But in the mean time we even found out that you probably do this from the console by a “normal user” as it would not have worked as you intended.

As I already mentioned behaviour is governed by repo priorities. Packman has top priority:

3400g:~ # repos
#  | Alias        | Enabled | GPG Check | Refresh | Priority | URI
---+--------------+---------+-----------+---------+----------+-------------------------------------------------------
 5 | Packman      | Yes     | (r ) Yes  | Yes     |   90     | https://ftp.fau.de/packman/suse/openSUSE_Tumbleweed/
21 | repo-non-oss | Yes     | (r ) Yes  | Yes     |   99     | https://download.opensuse.org/tumbleweed/repo/non-oss/
22 | repo-oss     | Yes     | (r ) Yes  | Yes     |   99     | https://download.opensuse.org/tumbleweed/repo/oss/
24 | repo-update  | Yes     | (r ) Yes  | Yes     |   99     | https://download.opensuse.org/update/tumbleweed/
15 | jalbum       | Yes     | (  ) No   | Yes     |  100     | https://jalbum.net/download/software/yumrepo/
3400g:~ # 

Usage of priorities has been heavily discouraged in the openSUSE forums on several occasions. However they are the perfect tool to have zypper do automatically what you want it to do without being annoyed by zypper asking questions:

1 Like

No, it does not. Repo priorities affects from where new packages are installed, not what happens with already installed packages.

You make a strong claim. However with host 3400g being up to date:

3400g:~ # repos Packman
Alias          : Packman
Name           : Packman
URI            : https://ftp.fau.de/packman/suse/openSUSE_Tumbleweed/
Enabled        : Yes
GPG Check      : (r ) Yes
Priority       : 90 (raised priority)
Autorefresh    : On
Keep Packages  : Off
Type           : rpm-md
GPG Key URI    : 
Path Prefix    : 
Parent Service : 
Keywords       : ---
Repo Info Path : /etc/zypp/repos.d/Packman.repo
MD Cache Path  : /var/cache/zypp/raw/Packman
3400g:~ # 
3400g:~ # zypper -n dup -D
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...
Nothing to do.
3400g:~ # 

Lowering Packman priority:

3400g:~ # repos Packman
Alias          : Packman
Name           : Packman
URI            : https://ftp.fau.de/packman/suse/openSUSE_Tumbleweed/
Enabled        : Yes
GPG Check      : (r ) Yes
Priority       : 100 (lowered priority)
Autorefresh    : On
Keep Packages  : Off
Type           : rpm-md
GPG Key URI    : 
Path Prefix    : 
Parent Service : 
Keywords       : ---
Repo Info Path : /etc/zypp/repos.d/Packman.repo
MD Cache Path  : /var/cache/zypp/raw/Packman
3400g:~ # 

Duping again moves installed packages:

 3400g:~ # zypper -n dup -D
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

The following 4 packages are going to be upgraded:
  libdca0 libvo-amrwbenc0 youtube-dl youtube-dl-bash-completion

The following 48 packages are going to be downgraded:
  Mesa Mesa-dri Mesa-gallium Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 Mesa-libva Mesa-vulkan-device-select conky ffmpeg-4 gdk-pixbuf-loader-libheif libavcodec58_134 libavcodec59 libavcodec60 libavdevice58_13 libavdevice60
  libavfilter7_110 libavfilter9 libavformat58_76 libavformat60 libavresample4_0 libavutil56_70 libavutil57 libavutil58 libfdk-aac2 libgbm1 libheif1 libopencore-amrnb0 libopencore-amrwb0 libpostproc55_9 libpostproc57 libquicktime0
  librist4 libswresample3_9 libswresample4 libswresample4_ff5 libswscale5_9 libswscale7 libvdpau_r600 libvdpau_radeonsi libvlc5 libvlccore9 libvulkan_intel libvulkan_radeon vlc vlc-lang vlc-noX vlc-qt

The following 52 packages are going to change vendor:
  Mesa                        http://packman.links2linux.de -> openSUSE
  Mesa-dri                    http://packman.links2linux.de -> openSUSE
  Mesa-gallium                http://packman.links2linux.de -> openSUSE
  Mesa-libEGL1                http://packman.links2linux.de -> openSUSE
  Mesa-libGL1                 http://packman.links2linux.de -> openSUSE
  Mesa-libglapi0              http://packman.links2linux.de -> openSUSE
  Mesa-libva                  http://packman.links2linux.de -> openSUSE
  Mesa-vulkan-device-select   http://packman.links2linux.de -> openSUSE
  conky                       http://packman.links2linux.de -> openSUSE
  ffmpeg-4                    http://packman.links2linux.de -> openSUSE
  gdk-pixbuf-loader-libheif   http://packman.links2linux.de -> openSUSE
  libavcodec58_134            http://packman.links2linux.de -> openSUSE
  libavcodec59                http://packman.links2linux.de -> openSUSE
  libavcodec60                http://packman.links2linux.de -> openSUSE
  libavdevice58_13            http://packman.links2linux.de -> openSUSE
  libavdevice60               http://packman.links2linux.de -> openSUSE
  libavfilter7_110            http://packman.links2linux.de -> openSUSE
  libavfilter9                http://packman.links2linux.de -> openSUSE
  libavformat58_76            http://packman.links2linux.de -> openSUSE
  libavformat60               http://packman.links2linux.de -> openSUSE
  libavresample4_0            http://packman.links2linux.de -> openSUSE
  libavutil56_70              http://packman.links2linux.de -> openSUSE
  libavutil57                 http://packman.links2linux.de -> openSUSE
  libavutil58                 http://packman.links2linux.de -> openSUSE
  libdca0                     http://packman.links2linux.de -> openSUSE
  libfdk-aac2                 http://packman.links2linux.de -> openSUSE
  libgbm1                     http://packman.links2linux.de -> openSUSE
  libheif1                    http://packman.links2linux.de -> openSUSE
  libopencore-amrnb0          http://packman.links2linux.de -> openSUSE
  libopencore-amrwb0          http://packman.links2linux.de -> openSUSE
  libpostproc55_9             http://packman.links2linux.de -> openSUSE
  libpostproc57               http://packman.links2linux.de -> openSUSE
  libquicktime0               http://packman.links2linux.de -> openSUSE
  librist4                    http://packman.links2linux.de -> openSUSE
  libswresample3_9            http://packman.links2linux.de -> openSUSE
  libswresample4              http://packman.links2linux.de -> openSUSE
  libswresample4_ff5          http://packman.links2linux.de -> openSUSE
  libswscale5_9               http://packman.links2linux.de -> openSUSE
  libswscale7                 http://packman.links2linux.de -> openSUSE
  libvdpau_r600               http://packman.links2linux.de -> openSUSE
  libvdpau_radeonsi           http://packman.links2linux.de -> openSUSE
  libvlc5                     http://packman.links2linux.de -> openSUSE
  libvlccore9                 http://packman.links2linux.de -> openSUSE
  libvo-amrwbenc0             http://packman.links2linux.de -> openSUSE
  libvulkan_intel             http://packman.links2linux.de -> openSUSE
  libvulkan_radeon            http://packman.links2linux.de -> openSUSE
  vlc                         http://packman.links2linux.de -> openSUSE
  vlc-lang                    http://packman.links2linux.de -> openSUSE
  vlc-noX                     http://packman.links2linux.de -> openSUSE
  vlc-qt                      http://packman.links2linux.de -> openSUSE
  youtube-dl                  http://packman.links2linux.de -> openSUSE
  youtube-dl-bash-completion  http://packman.links2linux.de -> openSUSE

4 packages to upgrade, 48 to downgrade, 52  to change vendor.
Overall download size: 66.8 MiB. Already cached: 0 B. After the operation, 25.1 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): y

Checking for file conflicts: (1 skipped) .............................................................................................................................................................................................[done]
Warning: 52 packages had to be excluded from file conflicts check because they are not yet downloaded.

    Note: Checking for file conflicts requires not installed packages to be downloaded in advance in
    order to access their file lists. See option '--download-in-advance / --dry-run --download-only'
    in the zypper manual page for details.

3400g:~ # 

And without priorities you get the same behavior as rockejulianlockhart.

I know, what to do and what not.
You maybe also…

Also what about different priorities?
If I had switched with allow-vendor-change, but want a specific package from a Repo with lower priority.
I switch to that package and the next zypper dup --allow-vendor-change will switch to the other Version.
Also pinning is not the best, I get no updates for the pinned package…

After setting up the Repos, install all packages from the Repo you want,
the best thing for updating an Tumbleweed is only zypper dup without --allow-vendor-change.

Check settings on your host.

bor@tw:~> zypper repos -pE
# | Alias               | Name        | Enabled | GPG Check | Refresh | Priority
--+---------------------+-------------+---------+-----------+---------+---------
1 | openSUSE-20221216-0 | openSUSE--> | Yes     | (r ) Yes  | Yes     |   99
2 | packman-essentials  | packman-e-> | Yes     | (r ) Yes  | Yes     |   98
4 | repo-non-oss        | openSUSE--> | Yes     | (r ) Yes  | Yes     |   99
6 | repo-update         | openSUSE--> | Yes     | (r ) Yes  | Yes     |   99
bor@tw:~> zypper se -xs Mesa-dri
Loading repository data...
Reading installed packages...

S | Name     | Type    | Version              | Arch   | Repository
--+----------+---------+----------------------+--------+-------------------------------
v | Mesa-dri | package | 23.1.3-1699.354.pm.1 | x86_64 | packman-essentials
v | Mesa-dri | package | 23.1.2-1699.353.pm.1 | i586   | packman-essentials
i | Mesa-dri | package | 23.1.2-352.1         | x86_64 | openSUSE-20221216-0 (20230623)
bor@tw:~> sudo zypper -n dup -D
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

Nothing to do.
bor@tw:~> sudo zypper -n dup -D --allow-vendor-change
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...


The following 30 packages are going to be upgraded:
  gdk-pixbuf-loader-libheif libavcodec59 libavcodec60 libavfilter8 libavfilter9
  libavformat59 libavformat60 libavutil57 libavutil58 libfdk-aac2 libgbm1
  libheif1 libheif-rav1e libheif-svtenc libopencore-amrnb0 libopencore-amrwb0
  libpostproc56 libpostproc57 libquicktime0 libswresample4 libswresample4_ff5
  libswscale6 libswscale7 Mesa Mesa-dri Mesa-gallium Mesa-libEGL1 Mesa-libGL1
  Mesa-libglapi0 Mesa-libva

The following 2 packages are going to be downgraded:
  libdca0 libvo-amrwbenc0

The following 32 packages are going to change vendor:
  gdk-pixbuf-loader-libheif  openSUSE -> http://packman.links2linux.de
  libavcodec59               openSUSE -> http://packman.links2linux.de
  libavcodec60               openSUSE -> http://packman.links2linux.de
  libavfilter8               openSUSE -> http://packman.links2linux.de
  libavfilter9               openSUSE -> http://packman.links2linux.de
  libavformat59              openSUSE -> http://packman.links2linux.de
  libavformat60              openSUSE -> http://packman.links2linux.de
  libavutil57                openSUSE -> http://packman.links2linux.de
  libavutil58                openSUSE -> http://packman.links2linux.de
  libdca0                    openSUSE -> http://packman.links2linux.de
  libfdk-aac2                openSUSE -> http://packman.links2linux.de
  libgbm1                    openSUSE -> http://packman.links2linux.de
  libheif1                   openSUSE -> http://packman.links2linux.de
  libheif-rav1e              openSUSE -> http://packman.links2linux.de
  libheif-svtenc             openSUSE -> http://packman.links2linux.de
  libopencore-amrnb0         openSUSE -> http://packman.links2linux.de
  libopencore-amrwb0         openSUSE -> http://packman.links2linux.de
  libpostproc56              openSUSE -> http://packman.links2linux.de
  libpostproc57              openSUSE -> http://packman.links2linux.de
  libquicktime0              openSUSE -> http://packman.links2linux.de
  libswresample4             openSUSE -> http://packman.links2linux.de
  libswresample4_ff5         openSUSE -> http://packman.links2linux.de
  libswscale6                openSUSE -> http://packman.links2linux.de
  libswscale7                openSUSE -> http://packman.links2linux.de
  libvo-amrwbenc0            openSUSE -> http://packman.links2linux.de
  Mesa                       openSUSE -> http://packman.links2linux.de
  Mesa-dri                   openSUSE -> http://packman.links2linux.de
  Mesa-gallium               openSUSE -> http://packman.links2linux.de
  Mesa-libEGL1               openSUSE -> http://packman.links2linux.de
  Mesa-libGL1                openSUSE -> http://packman.links2linux.de
  Mesa-libglapi0             openSUSE -> http://packman.links2linux.de
  Mesa-libva                 openSUSE -> http://packman.links2linux.de

The following 4 NEW packages are going to be installed:
  libde265-0 libx264-164 libx265-199 libxvidcore4

30 packages to upgrade, 2 to downgrade, 4 new, 32  to change vendor.
Overall download size: 43.0 MiB. Already cached: 0 B. After the operation,
additional 33.1 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y

Checking for file conflicts: (1 skipped) .................................[done]
Warning: 36 packages had to be excluded from file conflicts check because they are not yet downloaded.

    Note: Checking for file conflicts requires not installed packages to be
    downloaded in advance in order to access their file lists. See option
    '--download-in-advance / --dry-run --download-only' in the zypper manual
    page for details.

bor@tw:~> 

I presume some packages on your host are out of date. Host 3400g has:

3400g:~ # zypper se -xs Mesa-dri
Loading repository data...
Reading installed packages...

S | Name     | Type    | Version              | Arch   | Repository
--+----------+---------+----------------------+--------+------------------------
i | Mesa-dri | package | 23.1.3-1699.354.pm.1 | x86_64 | Packman
v | Mesa-dri | package | 23.1.2-1699.353.pm.1 | i586   | Packman
v | Mesa-dri | package | 23.1.3-353.1         | x86_64 | openSUSE-Tumbleweed-Oss
3400g:~ # 

Check package on your host by running:

3400g:~ # zypper if Mesa-dri
Loading repository data...
Reading installed packages...


Information for package Mesa-dri:
---------------------------------
Repository     : Packman
Name           : Mesa-dri
Version        : 23.1.3-1699.354.pm.1
Arch           : x86_64
Vendor         : http://packman.links2linux.de
Installed Size : 30.2 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : Mesa-drivers-23.1.3-1699.354.pm.1.src
Upstream URL   : https://www.mesa3d.org
Summary        : DRI plug-ins for 3D acceleration
Description    : 
    This package contains Mesa DRI drivers for 3D acceleration.

3400g:~ # 

i know what I want and I verify zypper is doing it correctly.

What is the base of your extraordinary claim? Up to now it’s baseless.

As far as I remember (but my memory is not what it was earlier), somewhere (2018?) --no-allow-vendor-change was made the default on Tumbleweed (thus NOT on Leap) for zypper dup. This to avoid the problems that arose when people forgot to do what was recommended as the one and only correct way to keep Tumbleweed up-to-date: zypper dup --no-allow-vendor-change

From then on the recommendation was( and IMHO still is): zypper dup.

I find it strange that now someone wants to undo this, apparently carefully designed special for Tumbleweed, by explicitly using --allow-vendor-change. There may be a reason when you are a real expert and doing something special. But I doubt this is the case with the OP.

1 Like

Because first using and switching to KDE-unstable and now wondering about switchin back to openSUSE:

The following 185 packages are going to change vendor:
  akonadi-server                            obs://build.opensuse.org/KDE:Unstable -> openSUSE
.
.
.
.

Yes, but I wonder where he found that he should use the allow. It is not recommended on the forums AFAIK. How did he invent it?

I always type su - -c 'zypper dup -d' then logout, hit ctrl>alt>f1, login as root, run zypper dup then reboot.

That’s what the docs said to do - not sure if they are old but it works fine for me. If it was anymore complicated than that to update my system I would run for my life back to Debian. Or maybe even Windows!

1 Like

I read the documentation before using OpenSUSE. That appears to be what most suggest. During that, I learnt of the relevant --allow-vendor-change flag.

Again, @hcvv, why is usage of it problematic? Considering that when adding additional repositories, they always state that the user should perform zypper dup --allow-vendor-change immediately subsequently, I see no reason why I should stop the second time I run zypper dup afterward.


@mong, I rather doubt that anyone uses the commandline to update Windows, considering that you’d at best need to use a third-party PowerShell module that’s been unmaintained for a few years by now.

Why not just use Discover - KDE Applications for your use-case?

Bloody hell!

Firstly, were you born after 1979? Secondly, do you like apples? Thirdly, I WAS JOKING!

No clue were you have read this, but it was no suggestion from an openSUSE documentation.

You should learn (and try to understand) the differences between the following two commands:

Correct example for use of --allow-vendor-change:

sudo zypper dup --from packman --allow-vendor-change

Generally wrong and dangerous application of --allow-vendor-change:

sudo zypper dup --allow-vendor-change

The first command applies the vendor change to only ONE particular repository. GOOD!

The second command applies the vendor change to ALL of your repositories which is potentially BAD! Dependend of how many repos (home, OBS, 3rd party, beta, …) you use, you will break your system in seconds…

And this explanation (in terminal form) was already given in the first answer in this thread by Sauerland :roll_eyes:

  1. Running zypper dist-upgrade --no-allow-vendor-change can result in outdated packages: How should one update from the commandline? - #28 by karlmistelberger

  2. Doing this repeatedly over a prolonged period of time makes sure users are confronted with puzzling annoyances.

  3. Zypper dup priorities - #7 by karlmistelberger

Stop posting utterly wrong and misleading information that will only confuse users.

2 Likes

You can see it in this very topic.

1 Like

Because this will result in uncontrolled switch to different repositories depending on which one happens to contain “newer” packages. RPM compares just the version string and version strings in different repositories from different vendors are completely independent. Different repositories may offer incompatible versions of packages (or different dependencies) which leads to potential breaking of your system in subtle ways.

Well, I personally think that this is wrong as well. This assumes that all currently installed packages must be switched to different repository if it provides them. I prefer to install only those packages I actually need and their dependencies if required.

But forgetting my personal opinion, this is one time action and performs (sort of) controlled switch of packages to different repository. As vendor is sticky by default, those packages remain associated with this repository.

See above. Because the second time you run it with all repositories and you do not know from which repositories zypper will chose to install this time.

1 Like