On Mon, 31 Oct 2022 21:13:48 +0100 Axel Beckert wrote: [...] > Francesco Poli wrote: [...] > > I won't be able to think about a possible better strategy until after > > bookworm is out and, anyway, I cannot promise you that this feature > > will actually be implemented, unfortunately. > > Sure. Maybe time shows new ideas and possibilities. I'd appreciate if > you leave that bug report open for such thoughts.
Hello Axel (hello Adrian), I am thinking about a possible implementation for this feature request. My current plan is as follows. First of all, I want to introduce a new APT configuration option named AptListbugs::DistroRelease (this can be set by the sysadmin in any APT configuration file, such as /etc/apt/apt.conf.d/10apt-listbugs ). Maybe even a corresponding command-line option (-r, --distro-release), which may override the APT configuration option. If this option is not set or set to the keyword "ANY", the behavior of apt-listbugs will not change. If this option is set, apt-listbugs will read it and: * if the value is "unstable", use the command 'distro-info --codename --devel' to translate it into the codename for the development distribution release (for Debian this will translate to "sid") * if the value is "testing", "stable", or "oldstable", use the command 'distro-info --codename --testing', 'distro-info --codename --stable', or 'distro-info --codename --oldstable' to translate it into the codename (for Debian, currently "trixie", "bookworm", or "bullseye") * otherwise, leave the value as it is After that, the (possibly translated) value is checked against the output of 'distro-info --codename --all' : if the value is not a recognized codename, exit with an error. Then, during its normal operation, apt-listbugs will check the tags of each bug. If the tags include some release tags (that is to say, tags that are equal to any of the codenames found in the output of 'distro-info --codename --all'), but not the codename corresponding to AptListbugs::DistroRelease (or to the -r option), then apt-listbugs will ignore the bug. Considerations: - I could use the value in APT::Default-Release , thus sparing the sysadmins another option to set, but setting APT::Default-Release has other effects (it alters the APT pinning, ...), and I do not want to force users to get those other effects, if they desire this feature in apt-listbugs, or the other way around. - This feature will add a new dependency on package 'distro-info'. Unfortunately, it seems there is no Ruby library to read distro-info-data (there seems to be 'libdistro-info-perl' for Perl, 'python3-distro-info' for Python, and 'librust-distro-info-dev' for Rust, but no library for Ruby), so I will have to call the command-line tool from withing the Ruby code... I'll try and see if the implementation of this plan is actually feasible. Bye. -- http://www.inventati.org/frx/ There's not a second to spare! To the laboratory! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
pgpi8FQi0e7qO.pgp
Description: PGP signature