Bug#1143584: apt: Missing check-valid-until translation in apt modernize-sources

Julian Andres Klode <[email protected]>
Newsgroups gmane.linux.debian.apt.devel
Message-ID <20260805225249.GA797120__42286.6488852137$1785963447$gmane$org@debian.org>
On Tue, Aug 04, 2026 at 03:38:34PM +0200, Samuel Thibault wrote:
> Package: apt
> Version: 3.3.1
> Severity: normal
> 
> Hello,
> 
> Apparently apt modernize-sources misses translating the
> check-valid-until option:
> 
> $ cat /etc/apt/sources.list
> [...]
> deb [check-valid-until=no trusted=yes] https://snapshot.debian.org/archive/debian/20210101T000000Z/ unstable main
> 
> $ apt modernize-sources
> [...]
> 
> $ cat /etc/apt/sources.list.d/debian.sources
> # Modernized from /etc/apt/sources.list
> Types: deb
> URIs: https://snapshot.debian.org/archive/debian/20210101T000000Z/
> Suites: unstable
> Components: main
> Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
> Trusted: yes
> 
> The trusted option was translated, but the check-valid-until option was
> not, while it is really needed for snapshot which is expected to have
> expired certificates.

Yes it does say so when you run it:

    This command supports the 'signed-by' and 'trusted' options. If you
    have specified other options inside [] brackets, please transfer them
    manually to the output files; see sources.list(5) for a mapping.

There are a lot of limitations because we don't have a sources.list
AST, and need to reconstruct from implementation classes.

Restructuring the parser to parse into an abstract presentation first
would be helpful as then we could use it to do complete translations
or other analysis.

--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.