teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0032-kernel-install-skip-50-depmod-if-depmod-is-not-avail.patch

ac3a84
From d1abf107c5b4c661886001de996bf03587bb35c1 Mon Sep 17 00:00:00 2001
ac3a84
From: Luca Boccassi <bluca@debian.org>
ac3a84
Date: Mon, 7 Nov 2022 16:28:33 +0000
ac3a84
Subject: [PATCH] kernel-install: skip 50-depmod if depmod is not available
ac3a84
ac3a84
Images might be built without any kernel module, and without
ac3a84
installing depmod as it is not needed. Skip it.
ac3a84
ac3a84
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023607
ac3a84
(cherry picked from commit cda4d00dfcbcd075cef95341f8a466f0c4ee8e1d)
ac3a84
ac3a84
Related #2138081
ac3a84
---
ac3a84
 src/kernel-install/50-depmod.install | 1 +
ac3a84
 1 file changed, 1 insertion(+)
ac3a84
ac3a84
diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install
ac3a84
index d4b991cfd6..43bd87c7ed 100755
ac3a84
--- a/src/kernel-install/50-depmod.install
ac3a84
+++ b/src/kernel-install/50-depmod.install
ac3a84
@@ -26,6 +26,7 @@ KERNEL_VERSION="${2:?}"
ac3a84
 case "$COMMAND" in
ac3a84
     add)
ac3a84
         [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0
ac3a84
+        command -v depmod >/dev/null || exit 0
ac3a84
         [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+depmod -a $KERNEL_VERSION"
ac3a84
         exec depmod -a "$KERNEL_VERSION"
ac3a84
         ;;