On 2024-01-14 08:54 +0100, Morten Hauke Solvang wrote: > That assumption was a bit misguided. The correct way would have been to > "apt install gdb" _without_ first removing gdb-minimal, that would have > avoided the removal of reverse dependencies.
> Pretty sure not only was this information printed, apt also asks for > confirmation if it has to install or remove more packages than > requested. But it did what you told it to do, although the outcome > might not have been what you desired. Right, makes sense to me. I was apparently just asleep at the wheel. > Good you sorted it out. The only question is why apt installed gdb even > though it removed plasma-workspace anyway. When I tried to replicate > your situation in a bookworm chroot, "apt remove gdb-minimal" removes > plasma-workspace but does not install gdb. I just ran 'apt install gdb-minimal' to get back to the state from before yesterday. If I then run 'apt remove gdb-minimal' I do infact see the warning you were saying I would see. $ sudo apt remove gdb-minimal ... (trimmed output) The following additional packages will be installed: gdb Suggested packages: gdb-doc gdbserver The following packages will be REMOVED: gdb-minimal kde-plasma-desktop kinfocenter plasma-desktop plasma-widgets-addons plasma-workspace plasma-workspace-wayland sddm-theme-breeze sddm-theme-debian-breeze The following NEW packages will be installed: gdb 0 upgraded, 1 newly installed, 9 to remove and 0 not upgraded. If I follow what you are saying, then this is all is fine, except that - It's a bit odd that plasma-desktop depends on gdb-minimal | gdb - Why is it installing gdb? - If it is installing gdb, then it shouldn't actually need to remove plasma-desktop. If I type 'n' to abort the 'apt remove ...' call, and instead install 'gdb', I see this: $ sudo apt install gdb ... (trimmed output) The following packages will be REMOVED: gdb-minimal The following NEW packages will be installed: gdb 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Need to get 3,962 kB of archives. After this operation, 1,757 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian bookworm/main amd64 gdb amd64 13.1-3 [3,962 kB] Fetched 3,962 kB in 0s (34.7 MB/s) dpkg: gdb-minimal: dependency problems, but removing anyway as you requested: plasma-workspace depends on gdb-minimal | gdb; however: Package gdb-minimal is to be removed. Package gdb is not installed. Package gdb-minimal which provides gdb is to be removed. plasma-workspace depends on gdb-minimal | gdb; however: Package gdb-minimal is to be removed. Package gdb is not installed. Package gdb-minimal which provides gdb is to be removed. ... (trimmed output) This ends up doing what I wanted to do yesterday: I get full gdb instead of gdb-minimal, and my desktop environemnt doesn't disappear. The warning from dpkg seems a bit odd, looks like it also is confused about whether or not gdb is installed (and the warning also is printed twice...). Maybe I'll try booting up a full clean install in a VM to see if I can reproduce, to rule out that there is anything else which is messed up on my system. Either way, thanks a lot for your reply! Best regards, Morten