Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.devel > #109508 > unrolled thread

apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories

Started byJonathan Kamens <jik@kamens.us>
First post2023-10-09 23:30 +0200
Last post2023-10-10 15:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.devel


Contents

  apt-listchanges: appropriate heuristic for ignoring sub-packages with  symlinked /usr/share/doc directories Jonathan Kamens <jik@kamens.us> - 2023-10-09 23:30 +0200
    Re: apt-listchanges: appropriate heuristic for ignoring sub-packages  with symlinked /usr/share/doc directories Simon Richter <sjr@debian.org> - 2023-10-10 08:20 +0200
      Re: apt-listchanges: appropriate heuristic for ignoring sub-packages  with symlinked /usr/share/doc directories Jonathan Kamens <jik@kamens.us> - 2023-10-10 15:10 +0200

#109508 — apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories

FromJonathan Kamens <jik@kamens.us>
Date2023-10-09 23:30 +0200
Subjectapt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories
Message-ID<Hn5Z8-eIYQ-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

As Russ noted in his recent message, it may be safe to optimize 
apt-listchanges by having it ignore packages which don't install any 
actual files in /usr/share/doc and which create a /usr/share/doc symlink 
pointing at another package.

I am therefore am considering adding the following heuristic to the 
program: ignore a package in apt-listchanges if it meets the following 
conditions:

  * binary package name different from source name
  * deb contains no changelog or NEWS files in /usr/share/doc
  * creates a symlink in /usr/share/doc with the binary package name as
    its name, pointing at another directory in /usr/share/doc

It is possible that this heuristic will fail to ignore some packages 
which we could have safely ignored, but I think it'll catch most of 
them, and my primary goal is that whatever heuristic it uses should 
/not/ ignore a package that should have been checked for entries to show 
the user. I.e., it's more important for the program to show the user 
everything they should see than for it to do less work.

I'm interested in any feedback that anyone has about whether this is a 
safe heuristic to use.

I did a quick analysis of what's in /usr/share/doc on my machine, and 
based on that analysis the following packages that create only links in 
/usr/share/doc would be ignored under this heurstic: binutils-multiarch, 
binutils-x86-64-linux-gnu, bogofilter, bogofilter-bdb, 
console-setup-linux, cpp-12, cpp-13, cups-bsd, db5.3-util, debconf-i18n, 
debconf-utils, default-jdk-headless, default-jre, emacs-gtk, 
firebird3.0-common, firebird3.0-server-core, firebird3.0-utils, g++, 
g++-12, g++-12-multilib, g++-13, g++-13-multilib, g++-multilib, gcc, 
gcc-12-multilib, gcc-13-multilib, gcc-multilib, gfortran, gfortran-12, 
gfortran-13, grub-pc, grub-pc-bin, grub2-common, iamerican, ibritish, 
klibc-utils, lib32asan8, lib32atomic1, lib32gcc-12-dev, lib32gcc-13-dev, 
lib32gcc-s1, lib32gomp1, lib32itm1, lib32quadmath0, lib32stdc++-12-dev, 
lib32stdc++-13-dev, lib32stdc++6, lib32ubsan1, libasan8, libatomic1, 
libbinutils, libbz2-dev, libcc1-0, libctf0, libdatrie-dev, libfbclient2, 
libffi-dev, libgcc-12-dev, libgcc-13-dev, libgcc-s1, libgccjit0, 
libgfortran-12-dev, libgfortran-13-dev, libgfortran5, libgomp1, 
libgprofng0, libhwasan0, libib-util, libitm1, liblsan0, libltdl-dev, 
libncurses-dev, libncurses6, libncursesw6, libobjc-13-dev, libobjc4, 
libparted-fs-resize0, libprotobuf-dev, libpython3-all-dev, 
libpython3.11, libpython3.11-dev, libpython3.11-stdlib, libquadmath0, 
libreadline-dev, libstdc++-12-dev, libstdc++-13-dev, libstdc++6, 
libthai-dev, libtsan2, libubsan1, libvirt-clients, libvirt-l10n, 
libx32asan8, libx32atomic1, libx32gcc-12-dev, libx32gcc-13-dev, 
libx32gcc-s1, libx32gomp1, libx32itm1, libx32quadmath0, 
libx32stdc++-12-dev, libx32stdc++-13-dev, libx32stdc++6, libx32ubsan1, 
linux-headers-amd64, linux-image-amd64, manpages-dev, 
openjdk-17-jdk-headless, openjdk-17-jre, openssh-server, 
openssh-sftp-server, p11-kit-modules, p7zip-full, python3-all, 
python3-all-dev, python3-debconf, python3-dev, python3-venv, 
python3-yubikey-manager, python3.11-dev, python3.11-venv, 
qemu-system-x86, r-base-dev, r-recommended, task-desktop, task-english, 
task-gnome-desktop, task-kde-desktop, task-laptop, task-ssh-server, 
tasksel-data, tlp-rdw, tre-agrep

The following packages which create a symlink and nothing else in 
/usr/share/doc would /not/ be ignored:

  * Binary package name not different from source: console-setup,
    gcc-12, gcc-13, groff, kmod, node-source-map, node-sprintf-js,
    parted, v4l-utils
  * Link name different from package name: wpasupplicant

Thanks,

jik

[toc] | [next] | [standalone]


#109512 — Re: apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories

FromSimon Richter <sjr@debian.org>
Date2023-10-10 08:20 +0200
SubjectRe: apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories
Message-ID<Hneg1-eO2A-5@gated-at.bofh.it>
In reply to#109508
Hi,

On 10/10/23 06:24, Jonathan Kamens wrote:

>   * binary package name different from source name
>   * deb contains no changelog or NEWS files in /usr/share/doc
>   * creates a symlink in /usr/share/doc with the binary package name as
>     its name, pointing at another directory in /usr/share/doc

I'd go an easier way: if the changelog is a symlink, its target is the 
changelog to use, so the same changelog (with the same file name) will 
be used by multiple packages, and all that's left is to deduplicate this 
list.

    Simon

[toc] | [prev] | [next] | [standalone]


#109515 — Re: apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories

FromJonathan Kamens <jik@kamens.us>
Date2023-10-10 15:10 +0200
SubjectRe: apt-listchanges: appropriate heuristic for ignoring sub-packages with symlinked /usr/share/doc directories
Message-ID<HnkEO-eSoh-13@gated-at.bofh.it>
In reply to#109512

[Multipart message — attachments visible in raw view] — view raw

On 10/10/23 02:18, Simon Richter wrote:
> On 10/10/23 06:24, Jonathan Kamens wrote:
>
>>   * binary package name different from source name
>>   * deb contains no changelog or NEWS files in /usr/share/doc
>>   * creates a symlink in /usr/share/doc with the binary package name as
>>     its name, pointing at another directory in /usr/share/doc
>
> I'd go an easier way: if the changelog is a symlink, its target is the 
> changelog to use, so the same changelog (with the same file name) will 
> be used by multiple packages, and all that's left is to deduplicate 
> this list.

The new version of apt-listchanges already deduplicates. The main point 
of the logic revamp I did was to add such deduplication instead of 
relying on version numbers to determine what to show the user.

Having said that, it doesn't make sense to do what you're proposing. If 
a package doesn't have any changelog files in it, but rather just a 
symlink to another package's changelog files, then those changelog files 
will have already been parsed by apt-listchanges and displayed to the 
user when the package that owns them was installed. As far as I can see 
the only thing that would be accomplished by doing what you suggest 
would be to make apt-listchanges slower, since it would have to locate 
and reparse all those changelog files, only to discover that their 
contents have already been displayed to the user.

   jik


[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.devel


csiph-web