wok-current view linux/stuff/check_modules.sh @ rev 8270

libart_lgpl: Changed depends to just glibc-base since it doesn't need gtk+.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jan 30 01:32:41 2011 +0000 (2011-01-30)
parents 63937e3b2979
children 2b6fda1dbf0d
line source
1 #!/bin/sh
2 # Echo any module in kernel .config that's not added to one of linux-* pkgs
3 # (c) SliTaz - GNU General Public License.
4 # 20090618 <jozee@slitaz.org>
5 # 20100528 <pankso@slitaz.org>
6 #
7 . /etc/tazwok.conf
8 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
9 src="$WOK/linux/linux-$VERSION"
11 cd $src
12 mkdir -p ../stuff/tmp
13 rm -f ../stuff/tmp/*
15 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs"
16 echo "======================================================================"
18 # create a packaged modules list
19 cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list
21 for i in $(cd $WOK; ls -d linux-*)
22 do
23 tazpath="taz/$i-$VERSION"
24 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
25 do
26 basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list
27 done
28 done
29 # get the original list in .config
30 for i in $(find $_pkg -iname "*.ko.gz")
31 do
32 basename $i >> ../stuff/tmp/originial-"$VERSION".list
33 done
34 # compare original .config and pkged modules
35 for i in $(cat ../stuff/tmp/originial-$VERSION.list)
36 do
37 if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then
38 modpath=`find $_pkg -iname "$i"`
39 echo "Orphan module: $i"
40 echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list
41 fi
42 done
43 if [ -f ../stuff/tmp/unpackaged-modules-"$VERSION".list ]; then
44 echo "======================================================================"
45 echo -e "Check linux/stuff/tmp/unpackaged-modules-$VERSION.list for mod path\n"
46 else
47 echo -e "\nAll modules are packaged\n"
48 echo "======================================================================"
49 echo ""
50 rm -rf ../stuff/tmp
51 fi