Richard Lewis wrote:
>> If a minimal system with gnupg is upgraded to trixie it is likely to pull in 
>> an
>> unwanted MTA because of changed dependencies. Such users may find it helpful
>> for a hint in the release notes to remove gpg-wks-server on upgrade, such as
>> with:
>>
>>   apt full-upgrade gpg-wks-server-

(I take it the context here is a system where the admin insists on
having gnupg installed but no MTA.  Personally I do the opposite: I
keep postfix installed but I only have gpg, not gnupg and all its
friends.)
 
> I was going to say that this shouldnt be needed as gpg-wks-server
> would be automatically installed and so will be removed.

In trixie gnupg still *suggests* gpg-wks-server, which just barely
enough for it to hold onto its "automatically installed" status.
 
> Apparently apt does not quite figure this out when following the
> recipe in the release-notes:
> 
> # in a minimal bookworm
> apt install gnupg # gpg-wks-server is automatically installed. no mta
> is installed
> 
> # section 4.4.5 of the release-notes says to first do:
> apt update
> apt upgrade --without-new-pkgs # gnupg is one of several packages held back
> 
> # 4.4.6 says to do:
> apt full-upgrade
> # gnupg is upgraded, gpg-wks-server is not removed, it is listed in
> "The following packages were automatically installed and are no longer
> required".
> # exim is installed!

Ah, because thanks to #1025782, trixie's gpg-wks-server has a hard
dependency on "default-mta | mail-transport-agent".
 
> # 4.5 is about errors. not relevant
> # 4.6 is inexplicably asking people to check a kernel meta-package is
> installed -- this should be moved much earlier, in "preparing for the
> upgrade" really

And it even mentions the fact that you might want to do your kernel
upgrade as part of the minimal system upgrade described in 4.4.5
instead of waiting for the full-upgrade.
 
> Neither 4.7 nor 4.8 say to run "apt autopurge" to remove automatically
> installed packages that are not needed.

Yes, the procedure shows clear signs of having been designed many
releases ago for aptitude/apt-get and only gradually adapted to use
apt.  I don't think much of those "grep|grep" commandlines in 4.6.1,
either, though they've been there for a long long time.  Couldn't it
be just... 

See if a kernel metapackage is installed:
 $ dpkg -l linux-image\* | grep ^ii.\*meta

If not, find one that you can install:
 $ apt-cache search linux-image-.\*meta

Why was any of that stuff with -i and filtering against transition
packages there?  Mind you, it's weird that apt seems to have no
equivalent of
 $ aptitude search linux-image~dmeta
 
> If i now do "apt autopurge" both gpg-wks-server and exim are removed,
> along with several other things (some of which are in the "apt list
> '~o'" recommended in 4.8)

The real question is whether there's ever going to be anything in that
~o list that *wouldn't* be removed by an autopurge.  And how about
transitional dummy packages?  As it happens I can do a check right
now... Well, that's interesting:
 * "apt list \~o" finds 68 things to remove, including several video
   codecs and the bookworm kernel;
 * "apt -s autopurge" finds 75 things, not including kernels or codecs
   but including gcc-12-base, pkexec, and several python libraries;
 * "dpkg -l | grep ransitional" finds fonts-liberation2, policykit-1
   (which is already removed but not purged), and usr-is-merged.
So yes, this wants to be an *extra* step.
 
> So: all that is missing is to add a reference to apt autopurge in 4.8?

It's definitely looking that way.

> (NB: if you ignore the release-notes and use aptitude it figures out
> that gpg-wks-server can be removed and doesnt install the mta.
>  doing "apt dist-upgrade" seems to be the same as the release-notes version)

Aptitude has always behaved well in my own dist-upgrade tests, but I'm
willing to believe there are systems where it would take forever to
untangle all the new desktop environment dependencies.
-- 
JBR     with qualifications in linguistics, experience as a Debian
        sysadmin, and probably no clue about this particular package

Reply via email to