[svn-commits] sruffell: branch 1.4 r4261 - in /branches/1.4: ./ build_tools/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 13 13:01:29 CDT 2008


Author: sruffell
Date: Tue May 13 13:01:28 2008
New Revision: 4261

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4261
Log:
Remove old zaptel modules from the kernel modules directory before installing
the new ones.  

(Related to issue #12262)

Modified:
    branches/1.4/Makefile
    branches/1.4/build_tools/uninstall-modules

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=4261&r1=4260&r2=4261
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Tue May 13 13:01:28 2008
@@ -525,15 +525,9 @@
 uninstall-hotplug:
 	$(MAKE) -C firmware hotplug-uninstall DESTDIR=$(DESTDIR)
 
-BASENAMES=$(sort $(shell for x in $(ALL_MODULES); do basename $x; done))
 uninstall-modules:
 ifneq ($(BUILDVER),linux24)
-	@./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(BASENAMES)
-	@for x in $(ALL_MODULES); do \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/misc/$$x ; \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/zaptel/$$x ; \
-	done;
+	@./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(ALL_MODULES)
 endif
 
 ifeq ($(BUILDVER),linux24)
@@ -541,7 +535,7 @@
 	$(INSTALL) -d $(DESTDIR)$(MOD_DIR)
 	$(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
 else
-install-modules: 
+install-modules: uninstall-modules
 	$(KMAKE_INST)
 endif
 	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :

Modified: branches/1.4/build_tools/uninstall-modules
URL: http://svn.digium.com/view/zaptel/branches/1.4/build_tools/uninstall-modules?view=diff&rev=4261&r1=4260&r2=4261
==============================================================================
--- branches/1.4/build_tools/uninstall-modules (original)
+++ branches/1.4/build_tools/uninstall-modules Tue May 13 13:01:28 2008
@@ -14,8 +14,8 @@
 	echo "Usage:"
 	echo "  $0 MODULES_BASE_DIR mod1 [mod2 [...]]"
 	echo ""
-	echo "  MODULES_BASE_DIR - typically /lib/odules/KVERS"
-	echo "  modN -             (optinally partial) module name to remove."
+	echo "  MODULES_BASE_DIR - typically /lib/modules/KVERS"
+	echo "  modN -             (optionally partial) module name to remove."
 }
 
 if [ -z "$KERNEL_MODULES_DIR" ]; then
@@ -30,9 +30,10 @@
 	exit 1;
 fi
 for mod in $MODULES; do 
-	for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep $mod`; do
+	BASE=`basename $mod`
+	for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep "$BASE$"`; do
 		if [ -e "$file" ]; then
-			echo "Deleting $file."
+			#echo "Deleting $file."
 			rm -f $file
 		fi
 	done




More information about the svn-commits mailing list