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

Re: Recommending packages via virtual package



On Tue, Apr 14, 2020 at 10:26:54AM +0200, Markus Frosch wrote:
> Apparently this no longer works. When I install a package like nginx
> and then a package recommending a web server, APT will still try to
> install apache2.
> 
> > apt install -y nginx
> > apt install wordpress

Lets ignore for the moment that wordpress actually doesn't have the
recommends line which is the TOPIC OF THE THREAD, but has instead a
"Depends: apache2 | httpd" among other things (← hint hint):

$ apt install wordpress nginx -so Debug::pkgDepCache::Marker=1
[…]
  MarkInstall nginx:amd64 < none -> 1.16.1-3 @un puN Ib > FU=1
[…]
  MarkInstall wordpress:amd64 < none -> 5.4+dfsg1-1 @un puN Ib > FU=1
    MarkInstall libapache2-mod-php:amd64 < none -> 2:7.4+75 @un uN Ib > FU=0
      MarkInstall libapache2-mod-php7.4:amd64 < none -> 7.4.3-4 @un uN Ib > FU=0
[…]
        MarkInstall apache2:amd64 < none -> 2.4.43-1 @un uN Ib > FU=0
[…]

So, the reason you get apache2 installed is the second(!) dependency:
"libapache2-mod-php | libapache2-mod-php5 | php | php5" which isn't THAT
surprising or very hard to find, is it?


I would hence ask you to explain a bit better why you think APT is wrong
and provide an example which actually shows these characteristics.
Otherwise I will apparently be a tiny bit annoyed by this thread.


Best regards

David Kalnischkies

P.S.: For these cases -o Debug::pkgDepCache::AutoInstall=1 shows pretty much
the same with less scary details. I just picked Marker as it is literally the
first think I try and as I implemented the display of these "@un puN Ib" flags
they are a little less scary for me.

Attachment: signature.asc
Description: PGP signature


Reply to: