Hello Michael Gilbert, Sorry for butting in here, but I have some questions and would be happy if you could enlighten me.
On Sun, Feb 07, 2021 at 09:51:28PM -0500, Michael Gilbert wrote: > package: src:debianutils > severity: serious > version: 4.11.2 > tag: patch > > debianutil's add-shell script uses awk, but awk is not an > Essential:yes package. True (because awk is not a package but a /virtual/ package), but awk is a "pseudo-essential" package since base-files (which is Essential: yes) Pre-Depends on awk. So you can't really not have (any implementation of) awk even if you only have essential packages available. > For systems where awk is not yet installed (chroots), installation of > dash will currently fail since it's postinst calls add-shell from > debianutils. Please share details about how to reproduce this situation! You say you don't have awk when dash postinst runs, but that would also mean you don't have base-files (since it pre-depends on awk), which means you're lacking essential packages while you're configuring dash! Sounds to me like you're doing something very peculiar and likely completely unsupported to be able to trigger this issue. Atleast I can't think of any obvious way how to trigger it. FWIW Essential packages have the special requirement that they have to provide their functionality before being configured (only unpacked), and no packages /configuration/ should start before all packages finished being unpacked. However you're claiming awk's not even been unpacked before you move on to configure some packages (dash in this case). For anyone interested in the subject this might also be useful to look at for the different possible states during a package installation: https://www.debian.org/doc/debian-policy/ap-flowcharts.html > > A simple fix seems possible, just change add-shell to use cat, which > is in coreutils (Essential:yes). Proposed update attached. Replacing using awk with cat whenever possible sounds like a good thing to do, so for the record I'm not against that. My skepticism is more at why this is not a wishlist bug report (that would be much better to adress early in a development cycle, rather than when we're already in the bullseye freeze). Regards, Andreas Henriksson PS. The reason for the weird awk Pre-Depends is to avoid making a particular implementation of awk Essential: yes, to avoid making it unneccesarily hard to switch to a different awk implementation. (eg. mawk -> gawk). Also AFAIK it's not possible to make a virtual package Essential: yes (because I've never seen that, but someone might say it's possible)...

