wok-6.x view linux/stuff/check_modules.sh @ rev 14546

firefox-langpack-ru: Up to 17.0.6esr
author Dominique Corbex <domcox@slitaz.org>
date Wed May 22 21:57:03 2013 +0200 (2013-05-22)
parents c0298010efaf
children db5b03f42dd9
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/slitaz/slitaz.conf
9 #WOK=$LOCAL_REPOSITORY/wok
10 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/')
11 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
12 BASEVER="${VERSION:0:3}"
13 src="$WOK/linux/source/linux-$VERSION"
15 cd $src
16 tmp=$WOK/${PACKAGE:-linux}/tmp
17 mkdir -p $tmp 2>/dev/null
18 rm -f $tmp/*
20 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs"
21 echo "======================================================================"
23 # create a packaged modules list
24 cat $WOK/linux/stuff/modules.list >> $tmp/pkgs-modules-"$VERSION".list
26 for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt | sed 's|/receipt||g')
27 do
28 tazpath="taz/$i-*"
29 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then
30 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z")
31 do
32 basename $j >> $tmp/pkgs-modules-"$VERSION".list
33 done
34 fi
35 done
36 # get the original list in .config
37 for i in $(find $_pkg -iname "*.ko.?z")
38 do
39 basename $i
40 done > $tmp/original-"$VERSION".list
41 # compare original .config and pkged modules
42 for i in $(cat $tmp/original-$VERSION.list)
43 do
44 if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then
45 modpath=`find $_pkg -iname "$i"`
46 echo "Orphan module: $i"
47 echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list
48 fi
49 done
50 if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then
51 echo "======================================================================"
52 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n"
53 else
54 echo -e "\nAll modules are packaged\n"
55 echo "======================================================================"
56 echo ""
57 rm -rf $tmp
58 fi