[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1068637: apt does not always install Recommends



On Mon, Apr 08, 2024 at 01:05:40PM +0200, Vincent Lefevre wrote:
> On 2024-04-08 12:29:17 +0200, Julian Andres Klode wrote:
> > On Mon, Apr 08, 2024 at 11:50:04AM +0200, Vincent Lefevre wrote:
> > > The lvm2 package is installed, but not thin-provisioning-tools,
> > > though lvm2 recommends it. This can yield a broken system:
[…]
> It is not mandatory in all cases, but it some cases. In any case,
> the "Recommends:" must be honored.

You haven't mentioned AT ALL if we are talking about upgrade or a fresh
install of lvm2, for the later see below. For the former:

Are you absolutely, positively sure that you haven't ignored apt
(aptitude) telling you that it wont install that recommends while
installing lvm2?

APT (and aptitude?) do not install old unsatisfied recommends on an
upgrade, so the only way of not getting thin-provisioning-tools
installed is either to not have it installed while it was new in which
case apt (and I think aptitude has somewhat similar) output contains:
| Recommended packages:
|  thin-provisioning-tools
Same for Suggests btw which aren't installed by default (but lvm2 has
none). Or you have removed thin-provisioning-tools at some point after
it was once installed.

And yes, as Julian explained, if a package is not installable, that
also leads to a recommends not being installed but same output.

(I somewhat doubt you have managed to install an lvm2 which had not yet
 a recommends on thin-provisioning-tools and upgraded that now to
 a version with that recommends. That would be a new recommends that apt
 tries to install, but might fail for reasons Julian mentioned already.
 Different upgrade-commands-implementations have different approaches to
 that – 'apt upgrade' e.g. tries to detect that and holds the upgrade
 off it does, while 'apt full-upgrade' ignores that. Both work better
 if the archive is a stable state… which tends to be the case with
 stable for obvious reasons. Less so for unstable.)


> No, lvm2 was installed before the time_t transition. It actually
> affects plain bookworm installations (on a machine where I installed
> Debian 12.1 on 2023-10-07); you can see with the attached
> "dpkg --get-selections" output I had at that time.
                                          ^^^^

What time? Before you installed lvm2? That output says lvm2 is
installed. So after it, but what are you trying to tell us then?

That you had lvm2 installed, upgraded it and it still didn't install
thin-provisioning-tools? Well, as explained above, working as intended.


I just bootstrapped a minimal stable chroot with mmdebstrap and behold:
| # apt install --install-recommends lvm2
| Reading package lists... Done
| Building dependency tree... Done
| Reading state information... Done
| The following additional packages will be installed:
|   dmeventd dmsetup libaio1 libdevmapper-event1.02.1 libdevmapper1.02.1 liblvm2cmd2.03 thin-provisioning-tools
| The following NEW packages will be installed:
|   dmeventd dmsetup libaio1 libdevmapper-event1.02.1 libdevmapper1.02.1 liblvm2cmd2.03 lvm2 thin-provisioning-tools
| 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
| Need to get 2662 kB of archives.
| After this operation, 9729 kB of additional disk space will be used.
| Do you want to continue? [Y/n] n
| Abort.

In other words your issue with a "plain bookworm" install is
unreproducible (My chroots are configured to not install recommends by
default, so I enable it explicitly on the command line here. There is no
difference in behaviour for apt. I think aptitude reacts differently, but
who knows). If I leave out the flag apt tells me it wont install the
recommends as shown above. What am I doing wrong, where is the bug?


So, if you want to have any chance of us investigating your problem as
a bug rather than as a user-error you will have to tell us what you did
exactly, preferably with easy to follow steps and output. Failing that,
on your bookworm install you might be lucky and still have the
installation/upgrade and such of lvm2 in your history.log(s).
That might shine some light on it as well.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: