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

Re: Automatic trimming of changelogs in binary packages



On Fri, Aug 19, 2022 at 09:01:22AM +0800, Paul Wise wrote:
> Before we consider enabling this by default, first we need a way for
> `apt changelog` to download the full changelog rather than loading the
> changelog from /usr/share/doc in the currently installed package.

You can tell apt to ignore the local changelogs completely with:
Acquire::Changelogs::AlwaysOnline "true";

This is set by default on ubuntu-vendor apts, not sure why as for
a repository identifying as "Origin: Ubuntu" apt knows that it should
grab the online changelog, regardless of the vendor apt is built for
(Acquire::Changelogs::AlwaysOnline::Origin::Ubuntu).


That is an all or nothing setting through as Ubuntu does trimming
unconditionally for all their packages. I don't see a logic¹ that would
be able to detect "builds with dh >= 14 (and hasn't opted out)" given
only binary package metadata, but I guess for most needless downloads
are not much of a concern.

¹ I guess we could implement looking at the free-form text in trimmed
  changelogs, but that feels a bit brittle. If the last line of the
  changelog doesn't start with " -- " … except that this isn't always
  the case as e.g. shown by dpkg.



As previously said, another problem is that not all repositories have
online changelogs – and most tools building repositories have no option
for it –, but a dh change either effects them all or we get into the
problem of wanting to know if a package will end up in a repository
which has them or not while building (build-profile?).


Also note that e.g. d-security has no online changelogs as far as apt
is concerned as they are not to be found on metadata.f-m.d.o (#490848).

The tracker uses a different URI which seemingly has them (and other
files for download apt doesn't know/offer), but I have no idea who
maintains that, if it should be used by others and the URI scheme is
slightly different (it doesn't contain the component the package
belongs to) so apt can't be told to use it anyway.
(And IF apt should use it, it should be told via the Release files,
 which only stable does currently, stable-updates and stable-security
 rely on apts built-in fallback which is sad)


Best regards

David Kalnischkies

P.S.: As I was quoted already, as a side note: I am not against nor in
favour of trimming; I am just pointing out potential problems and
sometimes even their solutions as far as apt is concerned.

Attachment: signature.asc
Description: PGP signature


Reply to: