compat-2.6: Make it possible to build without running depmod
PATCH 1/1 compat-2.6: Make it possible to build without running depmod
When building binary packages you normally don't want to run depmod for the running kernel. This patch allows packagers override depmod.
make DEPMOD=: ...
The patch also address the issue in the scripts called from Makefile and it should be compatible with current behaviour.
--- Makefile | 3 ++- scripts/check_depmod | 2 +- scripts/modlib.sh | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-)
Makefile +2 -1
@@ -8,6 +8,7 @@ endif export KLIB_BUILD ?= $(KLIB)/build # Sometimes not available in the path MODPROBE := /sbin/modprobe +DEPMOD := /sbin/depmod MADWIFI=$(shell $(MODPROBE) -l ath_pci) OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
@@ -182,7 +183,7 @@ uninstall: @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom/eeprom_93cx6.ko* @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom_93cx6.ko* @rm -f $(KLIB)/$(KMODDIR)/drivers/net/b44.ko* - @/sbin/depmod -ae + @$(DEPMOD) -ae @echo @echo "Your old wireless subsystem modules were left intact:" @echo
scripts/check_depmod +1 -1
@@ -12,7 +12,7 @@ DEPMOD_DIR="/etc/depmod.d/" COMPAT_DEPMOD_FILE=compat-wireless.conf GREP_REGEX_UPDATES="^[[:space:]]*search.*[[:space:]]updates\([[:space:]]\|$\)" GREP_REGEX_SEARCH="^[[:space:]]*search[[:space:]].\+$" -DEPMOD_CMD="depmod" +DEPMOD_CMD="${DEPMOD:-depmod}" function add_compat_depmod_conf { echo "NOTE: Your distribution lacks an $DEPMOD_DIR directory with "
scripts/modlib.sh +3 -2
@@ -10,6 +10,7 @@ PATH=$PATH:/usr/sbin:/sbin # Appended to module file at the end when we want to ignore one IGNORE_SUFFIX=".ignore" VER=`uname -r` +DEPMOD_CMD=${DEPMOD:-depmod} # If 'module' is found, its renamed to 'module.ignore' function module_disable {
@@ -39,7 +40,7 @@ function module_disable { echo -en "Disabling $MODULE ..." fi mv -f $i ${i}${IGNORE_SUFFIX} - depmod -ae + ${DEPMOD_CMD} -ae CHECK_AGAIN=`modprobe -l $MODULE` if [ "$CHECK" != "$CHECK_AGAIN" ]; then echo -e "\t[OK]\tModule disabled:"
@@ -65,7 +66,7 @@ function module_enable { echo -en "Enabling $MODULE ..." DIR=`dirname $i` mv $i $DIR/$MODULE_KO - depmod -ae + ${DEPMOD_CMD} -ae CHECK=`modprobe -l $MODULE` if [ "$DIR/$MODULE_KO" != $CHECK ]; then if [ -z $CHECK ]; then
Signature · 1 line
1.6.4.2