wok rev 3509

Add a check in linux to see if all modules in .config are categorized in linux-* pkgs
author Rohit Joshi <jozee@slitaz.org>
date Fri Jun 19 15:25:48 2009 +0000 (2009-06-19)
parents 57057e136fb7
children d91bf195bd16
files linux/receipt linux/stuff/check_modules.sh
line diff
     1.1 --- a/linux/receipt	Fri Jun 19 15:23:46 2009 +0000
     1.2 +++ b/linux/receipt	Fri Jun 19 15:25:48 2009 +0000
     1.3 @@ -87,6 +87,10 @@
     1.4      do
     1.5      	echo tazwok cook ${i%/receipt}
     1.6      done
     1.7 +	# check and echo modules
     1.8 +	 cp ./stuff/check_modules.sh $src
     1.9 +	 $src/check_modules.sh "$VERSION" "$WOK"
    1.10 +	
    1.11  }
    1.12  
    1.13  # Pre and post install commands for Tazpkg.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linux/stuff/check_modules.sh	Fri Jun 19 15:25:48 2009 +0000
     2.3 @@ -0,0 +1,43 @@
     2.4 +#!/bin/sh
     2.5 +# Echo any module in kernel .config that's not added to one of linux-* pkgs
     2.6 +# 2009/06/18 <jozee@slitaz.org> - GNU General Public License.
     2.7 +#
     2.8 +    
     2.9 +	VERSION=$1
    2.10 +	WOK=$2
    2.11 +	src=$WOK/linux/linux-$VERSION
    2.12 +	cd $src
    2.13 +	mkdir -p ../stuff/tmp
    2.14 +	rm -f ../stuff/tmp/* # clean up
    2.15 +	# create a packaged modules list
    2.16 +	cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list 
    2.17 +	
    2.18 +	for i in $(cd $WOK; ls -d linux-*)
    2.19 +    do
    2.20 +		tazpath="taz/$i-$VERSION"
    2.21 +		for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
    2.22 +		do
    2.23 +			basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list    
    2.24 +		done 	
    2.25 +    done
    2.26 +	# get the original list in .config
    2.27 +	for i in $(find $_pkg -iname "*.ko.gz") 
    2.28 +	do
    2.29 +		basename $i >> ../stuff/tmp/originial-"$VERSION".list
    2.30 +	done
    2.31 +    # compare original .config and pkged modules
    2.32 +	for i in $(cat ../stuff/tmp/originial-$VERSION.list)   
    2.33 +	do        
    2.34 +		if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then 
    2.35 +		    modpath=`find $_pkg -iname "$i"`
    2.36 +			echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list; 
    2.37 +		fi
    2.38 +	done
    2.39 +	if [ -f ../stuff/tmp/unpackaged-modules-"$VERSION".list ]; then
    2.40 +		echo "======================================================================"
    2.41 +		echo " Some modules selected in .config were not categorized in linux-* pkgs"
    2.42 +		echo "Check linux/stuff/tmp/unpackaged-modules-$VERSION.list to see"
    2.43 +		cat ../stuff/tmp/unpackaged-modules-$VERSION.list 
    2.44 +	else
    2.45 +		rm -r ../stuff/tmp
    2.46 +	fi