Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: deb-pkg: do not include empty hook directories

The linux-image package currently includes empty hook directories
(/etc/kernel/{pre,post}{inst,rm}.d/ by default).

These directories were perhaps intended as a fail-safe in case no
hook scripts exist there.

However, they are really unnecessary because the run-parts command is
already guarded by the following check:

test -d ${debhookdir}/${script}.d && run-parts ...

The only difference is that the run-parts command either runs for empty
directories (resulting in a no-op) or is skipped entirely.

The maintainer scripts will succeed without these dummy directories.

The linux-image packages from the Debian kernel do not contain
/etc/kernel/*.d/, either.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

-2
-2
scripts/package/builddeb
··· 76 76 # so do we; recent versions of dracut and initramfs-tools will obey this. 77 77 debhookdir=${KDEB_HOOKDIR:-/etc/kernel} 78 78 for script in postinst postrm preinst prerm; do 79 - mkdir -p "${pdir}${debhookdir}/${script}.d" 80 - 81 79 mkdir -p "${pdir}/DEBIAN" 82 80 cat <<-EOF > "${pdir}/DEBIAN/${script}" 83 81 #!/bin/sh