Exploding installations, due to nonsense package recommends

With default settings, if you uninstall a package pulled in as a recommends, you’ll also add a lock to prevent future automatic installations.

I am impressed. I tried several times to parse the post you were replying to and gave up every time. Anyway, regarding your statement

Where is this lock kept? Even assuming it exists.

bor@10:~> zypper se -i GeoIP
Loading repository data...
Reading installed packages...

S  | Name       | Summary                                              | Type
---+------------+------------------------------------------------------+--------
i  | GeoIP      | Library to find the country that any IP address or-> | package
i  | GeoIP-data | GeoLite country data for GeoIP                       | package
i+ | libGeoIP1  | Shared libraries of the GeoIP C API                  | package
bor@10:~> sudo zypper rm GeoIP
[sudo] password for root: 
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  GeoIP

1 package to remove.
After the operation, 174.9 KiB will be freed.
Continue? [y/n/v/...? shows all options] (y): 
(1/1) Removing GeoIP-1.6.12-6.3.1.x86_64 .................................[done]
 
bor@10:~> zypper ll

# | Name             | Type    | Repository | Comment
--+------------------+---------+------------+--------
1 | kernel-firmware* | package | (any)      | 
2 | ucode-*          | package | (any)      | 

bor@10:~> sudo zypper inr
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 2 NEW packages are going to be installed:
  GeoIP lifecycle-data-sle-module-development-tools

TLDR; OP is still trying to find someone else to blame.

That’s the thing, zypper doesn’t do that. What I mean with “you’ll also add a lock” is: a zypper rm needs to be followed by a zypper addlock:

# zypper rm kernel-firmware
# zypper addlock kernel-firmware

Yeah, that post by me was poorly worded. My bad indeed.

But you are not correct (or at least, not precise enough), on at least two accounts:

  • By default the kernel-firmware-all is installed. I have to add a lock NOT for that package (what I did by the way when I uninstalled it), but for kernel-firmware, otherwise I’ll get the latter on next dup. You have to query what the uninstalled recommended package provides - and add a lock for that too/instead, possibly - as an additional step, which I DID fail to do.
  • I am not trying to find someone else to blame, maybe you are too bigoted to realise? How in the Earth the two package are equally providing the same, recommended thing, when one is just some docs.

I am trying to come up with a good way to fix it, and to make a PR. Please, don’t make any more religious claims that I want mind reading, or just want to blame somebody, etc.
But I much appreciate a good idea for an elegant fix.
And by the way, it is just one example you are getting focused at, when in reality - as my original post stated - the whole official repos have several similar recommendation holes.

andrei@tumbleweed:~> rpm -q kernel-firmware kernel-firmware-all
package kernel-firmware is not installed
package kernel-firmware-all is not installed
andrei@tumbleweed:~> sudo zypper in --recommends kernel-default
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following recommended package was automatically selected:
  kernel-firmware-all

The following 42 NEW packages are going to be installed:
  crda dracut elfutils kernel-default kernel-firmware-all kernel-firmware-amdgpu kernel-firmware-ath10k
  kernel-firmware-ath11k kernel-firmware-atheros kernel-firmware-bluetooth kernel-firmware-bnx2 kernel-firmware-brcm
  kernel-firmware-chelsio kernel-firmware-dpaa2 kernel-firmware-i915 kernel-firmware-intel kernel-firmware-iwlwifi
  kernel-firmware-liquidio kernel-firmware-marvell kernel-firmware-media kernel-firmware-mediatek
  kernel-firmware-mellanox kernel-firmware-mwifiex kernel-firmware-network kernel-firmware-nfp kernel-firmware-nvidia
  kernel-firmware-platform kernel-firmware-prestera kernel-firmware-qcom kernel-firmware-qlogic kernel-firmware-radeon
  kernel-firmware-realtek kernel-firmware-serial kernel-firmware-sound kernel-firmware-ti kernel-firmware-ueagle
  kernel-firmware-usb-network libasm1 perl-Bootloader pigz wireless-regdb zstd

The following package requires a system reboot:
  kernel-default

42 new packages to install.
Overall download size: 514.7 MiB. Already cached: 0 B. After the operation, additional 645.5 MiB will be used.

    Note: System reboot required.
Continue? [y/n/v/...? shows all options] (y):

Where is this dreaded kernel-firmware you keep talking about?

Two things:

  • That pasted kernel-firmware-* cruft is so much better than 855MB of a single obsolete package, yes, thank you.
  • Work on your comprehension skills. I JUST mentioned I added a lock for kernel-firmware-all (after I uninstalled it, just as I should have done it according to @awerlang), that is why zypper picked kernel-firmware instead.

I already said I don’t need condescending comments.