Hi, Quoting Johannes Schauer Marin Rodrigues (2025-01-10 15:53:00) > 1. mmdebstrap fixes this > ------------------------ > > The problem with my workaround in mmdebstrap was that setting > > #clear DPkg::Pre-Install-Pkgs; > > in a config passed to apt via APT_CONFIG is rendered useless as > /etc/apt/apt.conf.d/70debconf will still take priority. So one possible > solution to this is: let mmdebstrap write yet another config file which is > able > to override 70debconf:
I have added this workaround in mmdebstrap 1.5.6 because a couple of packages like tzdata and perltidy are waiting for it to succeed its autopkgtest again and transition to testing. I'd like to drop this workaround again soon. > 2. apt fixes this > ----------------- > > In #debian-apt Julian argued that apt should really not be running *any* > scripts if "Dir" is not "/". The reason for that is that apt is not telling > scripts about the setting of "Dir" at all, so it's dangerous to call them if > apt is not operating on the root directory but a different path. According to > Julian (and I agree) it is weird if somebody runs: > > apt update -o Dir=foo > > and then hooks from the system outside of foo are run. So we could also fix > this by doing (minimal untested patch): while apt developers agree that it is not optimal for hooks to run if Dir is not /, a good patch would be much more complex than the POC I posted, so they would prefer debconf to change for this. > 3. debconf fixes this > --------------------- > > Thirdly, and lastly, one could argue that it does not make sense for > dpkg-preconfigure to do anything in a bootstrapping scenario where the user is > not asked debconf questions in the first place. Instead of inventing a way how > to communicate "we are in a bootstrapping scenario" to dpkg-preconfigure, > could > dpkg-reconfigure just exit early and do nothing if > DEBIAN_FRONTEND=noninteractive? Because in that case, there will not be any > debconf questions asked, so why run dpkg-preconfigure at all? I implemented that in https://salsa.debian.org/pkg-debconf/debconf/-/merge_requests/20 Thanks! cheers, josch
signature.asc
Description: signature