wok-stable view linux-libre/stuff/check_modules.sh @ rev 10596
e17 libs: clean receipt and bdeps to make edbus built
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 26 14:06:40 2011 +0200 (2011-05-26) |
parents | |
children | 903c03d31ebf |
line source
1 #!/bin/sh
2 # Echo any module in kernel .config that's not added to one of linux-libre-* pkgs
3 # (c) SliTaz - GNU General Public License.
4 # 20090618 <jozee@slitaz.org>
5 # 20100528 <pankso@slitaz.org>
6 #
7 #. /etc/slitaz/slitaz.conf
9 #WOK=$LOCAL_REPOSITORY/wok
10 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/')
11 VERSION=`grep ^VERSION= $WOK/linux-libre/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
12 src="$WOK/linux-libre/linux-$VERSION"
14 cd $src
15 mkdir -p $WOK/$PACKAGE/tmp
16 rm -f $WOK/$PACKAGE/tmp/*
18 echo -e "\nChecking for modules selected in .config but not in linux-libre-* pkgs"
19 echo "======================================================================"
21 # create a packaged modules list
22 cat ../stuff/modules-"$VERSION".list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list
24 for i in $(cd $WOK; ls -d linux-libre-*)
25 do
26 tazpath="taz/$i-$VERSION"
27 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
28 do
29 basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list
30 done
31 done
32 # get the original list in .config
33 for i in $(find $_pkg -iname "*.ko.gz")
34 do
35 basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list
36 done
37 # compare original .config and pkged modules
38 for i in $(cat $WOK/$PACKAGE/tmp/originial-$VERSION.list)
39 do
40 if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then
41 modpath=`find $_pkg -iname "$i"`
42 echo "Orphan module: $i"
43 echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list
44 fi
45 done
46 if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then
47 echo "======================================================================"
48 echo -e "Check linux-libre/tmp/unpackaged-modules-$VERSION.list for mod path\n"
49 else
50 echo -e "\nAll modules are packaged\n"
51 echo "======================================================================"
52 echo ""
53 rm -rf $WOK/$PACKAGE/tmp
54 fi