wok-next annotate linux/stuff/check_modules.sh @ rev 13936
gnome-games: fix build
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jan 26 17:04:10 2013 +0000 (2013-01-26) |
parents | edd6117a0e47 |
children | 4371e2f99088 |
rev | line source |
---|---|
jozee@3509 | 1 #!/bin/sh |
jozee@3509 | 2 # Echo any module in kernel .config that's not added to one of linux-* pkgs |
pankso@5666 | 3 # (c) SliTaz - GNU General Public License. |
pankso@5666 | 4 # 20090618 <jozee@slitaz.org> |
pankso@5666 | 5 # 20100528 <pankso@slitaz.org> |
jozee@3509 | 6 # |
slaxemulator@8681 | 7 #. /etc/slitaz/slitaz.conf |
slaxemulator@8681 | 8 |
slaxemulator@8681 | 9 #WOK=$LOCAL_REPOSITORY/wok |
slaxemulator@8681 | 10 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/') |
pankso@5640 | 11 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
pankso@12285 | 12 BASEVER="${VERSION:0:3}" |
pankso@12285 | 13 src="$WOK/linux/source/linux-$VERSION" |
pankso@5640 | 14 |
pankso@5640 | 15 cd $src |
pankso@12285 | 16 mkdir -p $WOK/$PACKAGE/tmp 2>/dev/null |
slaxemulator@8728 | 17 rm -f $WOK/$PACKAGE/tmp/* |
pankso@5640 | 18 |
pankso@5666 | 19 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs" |
pankso@5666 | 20 echo "======================================================================" |
pankso@5666 | 21 |
pankso@5640 | 22 # create a packaged modules list |
pankso@12285 | 23 cat $WOK/linux/stuff/modules.list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list |
pankso@5640 | 24 |
pankso@12285 | 25 for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt | sed 's|/receipt||g') |
pankso@5640 | 26 do |
pankso@12285 | 27 tazpath="taz/$i-*" |
slaxemulator@9640 | 28 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then |
pascal@13930 | 29 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z") |
slaxemulator@9639 | 30 do |
slaxemulator@9639 | 31 basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list |
slaxemulator@9639 | 32 done |
slaxemulator@9639 | 33 fi |
pankso@5640 | 34 done |
pankso@5640 | 35 # get the original list in .config |
pascal@13930 | 36 for i in $(find $_pkg -iname "*.ko.?z") |
pankso@5640 | 37 do |
pascal@13930 | 38 basename $i |
pascal@13933 | 39 done > $WOK/$PACKAGE/tmp/original-"$VERSION".list |
pankso@5640 | 40 # compare original .config and pkged modules |
pascal@13930 | 41 for i in $(cat $WOK/$PACKAGE/tmp/original-$VERSION.list) |
slaxemulator@9639 | 42 do |
slaxemulator@9639 | 43 if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then |
pankso@5640 | 44 modpath=`find $_pkg -iname "$i"` |
pankso@5666 | 45 echo "Orphan module: $i" |
slaxemulator@8728 | 46 echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list |
jozee@3509 | 47 fi |
pankso@5640 | 48 done |
slaxemulator@8728 | 49 if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then |
pankso@5640 | 50 echo "======================================================================" |
gokhlayeh@8302 | 51 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n" |
pankso@5640 | 52 else |
pankso@5640 | 53 echo -e "\nAll modules are packaged\n" |
pankso@5666 | 54 echo "======================================================================" |
pankso@5666 | 55 echo "" |
slaxemulator@8728 | 56 rm -rf $WOK/$PACKAGE/tmp |
pankso@5640 | 57 fi |