Quoting Masahiro Yamada (2024-12-03 10:27:11) > > @@ -68,11 +70,18 @@ install_linux_image () { > > # kernel packages, as well as kernel packages built using make-kpkg. > > # make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and > > # so do we; recent versions of dracut and initramfs-tools will obey this. > > - debhookdir=${KDEB_HOOKDIR:-/etc/kernel} > > + debhookdir=${KDEB_HOOKDIR:-/etc/kernel /usr/share/kernel} > > + > > + # Only pre-create the first hook directory. Support for more than one hook > > + # directory requires run-parts 5.21 and it is the responsibility of packages > > + # creating additional hook directories to declare that dependency. > > + firsthookdir=${debhookdir%% *} > > for script in postinst postrm preinst prerm; do > > - mkdir -p "${pdir}${debhookdir}/${script}.d" > > + mkdir -p "${pdir}${firsthookdir}/${script}.d" > > I still do not understand why this 'mkdir' is needed. > > linux-image package does not install any script into the hook directory. > In general, there exist some scripts (e.g. initramfs-tools) already > under /etc/kernel/*.d/ (and under /usr/share/kernel/*.d/ once the > new location is used broader). > If nothing exists under the hook directory, there is no point to > execute run-parts. Unless I'm misunderstanding the old code, the existing script *does* create /etc/kernel/*.d/ (That's the "- mkdir -p" line above) so I wanted to preserve this behaviour even with more than one directory in KDEB_HOOKDIR. Do I misunderstand something? Are you saying that with this change, no /etc/kernel/*.d/ should be created anymore? Why? > > + done > > > > - mkdir -p "${pdir}/DEBIAN" > > + mkdir -p "${pdir}/DEBIAN" > > Please drop this noise change. > > If you want to optimize this, please split it into a separate patch like > "kbuild: deb-pkg: create DEBIAN directory just once" etc. Okay, no need to optimize this now. mkdir -p is cheap. Thanks! cheers, josch
Attachment:
signature.asc
Description: signature