Philip Hands <phil@hands.com> (2025-05-15): > Cyril Brulebois <kibi@debian.org> writes: > > > The problem is that apt-setup is currently working on a single > > sources.list file, and having the 60local generator work on a different > > one would likely mean reworking the debconf automaton quick a bunch. It > > could also break the CI (mostly run/monitored by the other Roland and by > > Phil, hence the explicit cc). > > It seems to me that we need a new debconf setting, so that code to > migrate towards deb822 usage can be added without immediately breaking > things. > > We could have e.g. `apt-setup/use-deb822-format` that might take values > like: > > `no`: > everything should be in sources.list format. > > Is that what we currently have, or are we already in a mixed state, > with some things generating deb822 already? [ and yes-maybe, and yes ] What I was trying to convey above is that absolutely everything is sources.list-centric, not just the format, but also that one particular file. The core of the debconf state machine (what I called automaton) is about writing a temporary file, passing it to apt-setup-verify after the generator has worked, and fiddling with $ROOT/etc/apt/sources.list.new depending on the verification; at the end of the loop, it's renaming $ROOT/etc/apt/sources.list.new into the final $ROOT/etc/apt/sources.list if everything went OK: https://sources.debian.org/src/apt-setup/1%3A0.194/apt-setup/#L50-L92 I'm worried about the way the current logic is written (basically “looping over a temporary sources.list”) and about having to change it, more than about how we could pick and choose which format is generated for which generator. If we were to say pass an extra argument (requesting .list or .sources) to each generator, we would need to also adjust how each generated file is validated. Otherwise, sure, having some setting to control which format to generate would make it easy to test, then switch once we're confident enough. It just looks to me that's something we can only implement after rewriting both apt-setup and apt-setup-verify quite a bit… > 'update': > use apt-get update to convert .list files Assuming we're talking about `apt modernize-sources` here, that's the only part that would seem easy to experiment with: we would only need to control whether to post-process the generated sources.list file, without starting with a big logic rewrite. Cheers, -- Cyril Brulebois (kibi@debian.org) <https://debamax.com/> D-I release manager -- Release team member -- Freelance Consultant
Attachment:
signature.asc
Description: PGP signature