Behaviour of zypper in case of temporarily unaccessible repos

All openSUSE sites happened to be down this night just when I did a zypper dup. The response was interesting.

Every repo was reported as invalid, e.g.:

Repository 'openSUSE-Tumbleweed-Oss' is invalid.
[repo-oss|http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/] Valid metadata not found at specified URL
History:
 - [|] Error trying to read from 'http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/'
 - Location 'http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/content' is temporarily unaccessible.

Followed by:

Computing distribution upgrade...

The following 345 packages are going to be REMOVED:
... lots of packages ...

The following 10 patterns are going to be REMOVED:
  apparmor base basesystem console documentation enhanced_base minimal_base sw_management x11_yast yast2_basis

345 packages to remove.
After the operation, 1.6 GiB will be freed.

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): n

Shouldn’t zypper at least leave all packages from inaccessible or temporarily unaccessible repos untouched?

I wonder what would have happened if I did:
zypper --non-interactive dup

Can you provide a list of your repositories with zypper lr -d

# | Alias                        | Name                         | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                   | Service
--+------------------------------+------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------------------+--------
1 | home_seife_testing           | home:seife:testing           | Yes     | (r ) Yes  | Yes     |  100     | rpm-md | https://download.opensuse.org/repositories/home:/seife:/testing/openSUSE_Factory_ARM/ | 
2 | openSUSE_Factory_ARM_NonFree | openSUSE:Factory:ARM:NonFree | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Factory:/ARM:/NonFree/standard/  | 
3 | repo-debug                   | openSUSE-Tumbleweed-Debug    | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/ports/aarch64/debug/tumbleweed/repo/oss/                 | 
4 | repo-oss                     | openSUSE-Tumbleweed-Oss      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/                       | 
5 | repo-source                  | openSUSE-Tumbleweed-Source   | No      | ----      | ----    |   99     | N/A    | http://download.opensuse.org/ports/aarch64/source/tumbleweed/repo/oss/                | 
6 | repo-update                  | openSUSE-Tumbleweed-Update   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/ports/aarch64/update/tumbleweed/                         | 

That was the list on one of my Raspberry Pi’s.

The behaviour of zypper dup on my laptop was the same. It contains a bit more repos:

#  | Alias                            | Name                                 | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                            | Service
---+----------------------------------+--------------------------------------+---------+-----------+---------+----------+--------+------------------------------------------------------------------------------------------------+--------
 1 | Application_Geo                  | Application:Geo                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Tumbleweed/               | 
 2 | devel_languages_perl             | devel:languages:perl                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_Tumbleweed/         | 
 3 | devel_languages_perl_CPAN-G      | devel:languages:perl:CPAN-G          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/devel:/languages:/perl:/CPAN-G/openSUSE_Tumbleweed/ | 
 4 | devel_languages_perl_CPAN-T      | devel:languages:perl:CPAN-T          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/devel:/languages:/perl:/CPAN-T/openSUSE_Tumbleweed/ | 
 5 | devel_tools                      | devel:tools                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/devel:/tools/openSUSE_Tumbleweed/                   | 
 6 | download.opensuse.org-non-oss    | Main Repository (NON-OSS)            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/tumbleweed/repo/non-oss/                                         | 
 7 | download.opensuse.org-oss        | Main Repository (OSS)                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/tumbleweed/repo/oss/                                             | 
 8 | download.opensuse.org-tumbleweed | Main Update Repository               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/update/tumbleweed/                                               | 
 9 | google-chrome                    | google-chrome                        | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://dl.google.com/linux/chrome/rpm/stable/x86_64                                           | 
10 | hardware                         | Hardware tools (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/hardware/openSUSE_Tumbleweed/                       | 
11 | home_adra                        | home:adra                            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/home:/adra/openSUSE_Tumbleweed/                     | 
12 | openh264                         | openh264                             | Yes     | (r ) Yes  | Yes     |   90     | rpm-md | http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed/                                       | 
13 | packman                          | Packman                              | Yes     | (r ) Yes  | Yes     |   90     | rpm-md | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/                           | 
14 | repo-debug                       | openSUSE-Tumbleweed-Debug            | No      | ----      | ----    |   99     | N/A    | https://download.opensuse.org/debug/tumbleweed/repo/oss/                                       | 
15 | repo-source                      | openSUSE-Tumbleweed-Source           | No      | ----      | ----    |   99     | N/A    | https://download.opensuse.org/source/tumbleweed/repo/oss/                                      | 
16 | vscodium                         | Visual Studio Codium                 | No      | ----      | ----    |   99     | rpm-md | https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/rpms                                       | 

@PCU It’s always an issue when adding third party repos, especially home ones… If it happens again use zypper -vvv dup as it should provide more insight onto why it wants to remove or switch. You need to look at some of the packages that were going to be removed and where they were installed from.

On my Raspberry Pi I have removed the red herring, the home_seife_testing repo. The only thing used from that repo was fake-hwclock, which I now get from openSUSE_Factory_ARM_NonFree. When I started some four years ago it was not included in that repo yet.

So now my repo list looks like:

# zypper lr -d
# | Alias                        | Name                         | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                  | Service
--+------------------------------+------------------------------+---------+-----------+---------+----------+--------+--------------------------------------------------------------------------------------+--------
1 | openSUSE_Factory_ARM_NonFree | openSUSE:Factory:ARM:NonFree | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Factory:/ARM:/NonFree/standard/ | 
2 | repo-debug                   | openSUSE-Tumbleweed-Debug    | No      | ----      | ----    |   99     | N/A    | https://download.opensuse.org/ports/aarch64/debug/tumbleweed/repo/oss/               | 
3 | repo-oss                     | openSUSE-Tumbleweed-Oss      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/                     | 
4 | repo-source                  | openSUSE-Tumbleweed-Source   | No      | ----      | ----    |   99     | N/A    | https://download.opensuse.org/ports/aarch64/source/tumbleweed/repo/oss/              | 
5 | repo-update                  | openSUSE-Tumbleweed-Update   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/ports/aarch64/update/tumbleweed/                       | 

Nice and clean.
Now disconnecting the network to mimic the unavailability of the openSUSE sites I experienced last week:

DEVICE         TYPE      STATE                   CONNECTION         
enu1u1         ethernet  connected               Wired connection 1 
lo             loopback  connected (externally)  lo                 
wlan0          wifi      disconnected            --                 
p2p-dev-wlan0  wifi-p2p  disconnected            --                 

## nmcli device down enu1u1
Device 'enu1u1' successfully disconnected.

# nmcli device status
DEVICE         TYPE      STATE                   CONNECTION 
lo             loopback  connected (externally)  lo         
enu1u1         ethernet  disconnected            --         
wlan0          wifi      disconnected            --         
p2p-dev-wlan0  wifi-p2p  disconnected            --         

# ping -c3 forums.opensuse.org
ping: forums.opensuse.org: Name or service not known

And now the update:

# zypper -vvv dup
Verbosity: 3
Initializing Target
Checking whether to refresh metadata for openSUSE:Factory:ARM:NonFree
Retrieving: https://download.opensuse.org/repositories/openSUSE:/Factory:[error]
Retrieving: https://download.opensuse.org/repositories/openSUSE:/Factory:[error]
Retrieving: https://download.opensuse.org/repositories/openSUSE:/Factory:[error]
Retrieving repository 'openSUSE:Factory:ARM:NonFree' metadata ...........[error]
Repository 'openSUSE:Factory:ARM:NonFree' is invalid.
[openSUSE_Factory_ARM_NonFree|https://download.opensuse.org/repositories/openSUSE:/Factory:/ARM:/NonFree/standard/] Valid metadata not found at specified URL
History:
 - [|] Error trying to read from 'https://download.opensuse.org/repositories/openSUSE:/Factory:/ARM:/NonFree/standard/'
 - Download (curl) error for 'https://download.opensuse.org/repositories/openSUSE:/Factory:/ARM:/NonFree/standard/content':
   Error code: Connection failed
   Error message: Could not resolve host: download.opensuse.org

Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository 'openSUSE:Factory:ARM:NonFree' because of the above error.
Checking whether to refresh metadata for openSUSE-Tumbleweed-Oss
Retrieving: https://download.opensuse.org/ports/aarch64/tumbleweed/repo/o[error]
Retrieving: https://download.opensuse.org/ports/aarch64/tumbleweed/repo/o[error]
Retrieving: https://download.opensuse.org/ports/aarch64/tumbleweed/repo/o[error]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata ................[error]
Repository 'openSUSE-Tumbleweed-Oss' is invalid.
[repo-oss|https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/] Valid metadata not found at specified URL
History:
 - [|] Error trying to read from 'https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/'
 - Download (curl) error for 'https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/content':
   Error code: Connection failed
   Error message: Could not resolve host: download.opensuse.org

Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository 'openSUSE-Tumbleweed-Oss' because of the above error.
Checking whether to refresh metadata for openSUSE-Tumbleweed-Update
Retrieving: https://download.opensuse.org/ports/aarch64/update/tumbleweed[error]
Retrieving: https://download.opensuse.org/ports/aarch64/update/tumbleweed[error]
Retrieving: https://download.opensuse.org/ports/aarch64/update/tumbleweed[error]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata .............[error]
Repository 'openSUSE-Tumbleweed-Update' is invalid.
[repo-update|https://download.opensuse.org/ports/aarch64/update/tumbleweed/] Valid metadata not found at specified URL
History:
 - [|] Error trying to read from 'https://download.opensuse.org/ports/aarch64/update/tumbleweed/'
 - Download (curl) error for 'https://download.opensuse.org/ports/aarch64/update/tumbleweed/content':
   Error code: Connection failed
   Error message: Could not resolve host: download.opensuse.org

Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository 'openSUSE-Tumbleweed-Update' because of the above error.
Some of the repositories have not been refreshed because of an error.
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...
Force resolution: No
Computing upgrade...

The following 345 packages are going to be REMOVED:
  Mesa                        
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-demo-x                 
    9.0.0-3.3                      aarch64  openSUSE
  Mesa-dri                    
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-gallium                
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-libEGL1                
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-libGL1                 
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-libglapi0              
    24.1.2-383.1                   aarch64  openSUSE
  Mesa-libva                  
    24.1.2-383.1                   aarch64  openSUSE
  aaa_base-extras             
    84.87+git20240620.57ee9e1-1.1  aarch64  openSUSE
  acl                         
    2.3.2-2.1                      aarch64  openSUSE
  adjtimex                    
    1.29-8.15                      aarch64  openSUSE

... <list goes on, removed by me for brevity>  ...

  yast2-users                 
    5.0.1-1.4                      aarch64  openSUSE
  yast2-vm                    
    5.0.0-1.4                      aarch64  openSUSE
  zstd                        
    1.5.6-1.1                      aarch64  openSUSE

The following 10 patterns are going to be REMOVED:
  apparmor       20200505-52.1  aarch64  openSUSE
  base           20200505-52.1  aarch64  openSUSE
  basesystem     20200505-52.1  aarch64  openSUSE
  console        20200505-52.1  aarch64  openSUSE
  documentation  20200505-52.1  aarch64  openSUSE
  enhanced_base  20200505-52.1  aarch64  openSUSE
  minimal_base   20200505-52.1  aarch64  openSUSE
  sw_management  20200505-52.1  aarch64  openSUSE
  x11_yast       20220411-1.7   aarch64  openSUSE
  yast2_basis    20220411-1.7   aarch64  openSUSE

345 packages to remove.
After the operation, 1.6 GiB will be freed.

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): n

Conclusion: zypper dup happily will remove everything from a repo if it cannot be reached.

This is nothing new, I have seen this behaviour quite some time ago as well. I remember that I was contemplating to do some kind of automatic update and reboot each day early in the morning, but after seeing this behaviour I put that thought into the category “Bad Ideas”.

1 Like

Did you open bug report?

Sorry, but it’s comforting to see that I’m not the only one having problems with the Opensuse repositories.

@PCU You also need to create a bug report for fake-hwclock as it should be in the repo by now and build for aarch64…
https://build.opensuse.org/package/show/openSUSE:Factory/fake-hwclock

I use rtc’s on my RPi3’s HCL:Raspberry Pi3 RTC - openSUSE Wiki

Yes, I just did: 1228434 – Behaviour of zypper dup in case of (temporarily) unaccessible repos

No: I said it is available now and I’m using the one from openSUSE-Tumbleweed-Oss now:

# zypper se -is fake-hw
Loading repository data...
Reading installed packages...

S  | Name         | Type    | Version  | Arch   | Repository
---+--------------+---------+----------+--------+------------------------
i+ | fake-hwclock | package | 0.13-1.1 | noarch | openSUSE-Tumbleweed-Oss

Nice! Thanks for the hint.

@PCU the RTC’s are a reasonable price and worth the little bit of effort…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.