From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>
Subject: [PATCH] kbuild: deb-pkg: do not include empty hook directories
Date: Tue, 3 Dec 2024 22:59:58 +0900 [thread overview]
Message-ID: <20241203140108.3401773-1-masahiroy@kernel.org> (raw)
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 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.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/package/builddeb | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index fb686fd3266f..e823742e17c4 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -70,8 +70,6 @@ install_linux_image () {
# so do we; recent versions of dracut and initramfs-tools will obey this.
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
for script in postinst postrm preinst prerm; do
- mkdir -p "${pdir}${debhookdir}/${script}.d"
-
mkdir -p "${pdir}/DEBIAN"
cat <<-EOF > "${pdir}/DEBIAN/${script}"
#!/bin/sh
--
2.43.0
next reply other threads:[~2024-12-03 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 13:59 Masahiro Yamada [this message]
2024-12-03 14:16 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241203140108.3401773-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®