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
@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.
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”.