wok-6.x annotate linux/stuff/check_modules.sh @ rev 12431

ekiga: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 21 17:25:54 2012 +0200 (2012-04-21)
parents 973f4b50dcf3
children edd6117a0e47
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
slaxemulator@9639 29 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
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
slaxemulator@9639 36 for i in $(find $_pkg -iname "*.ko.gz")
pankso@5640 37 do
slaxemulator@8728 38 basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list
pankso@5640 39 done
pankso@5640 40 # compare original .config and pkged modules
slaxemulator@9639 41 for i in $(cat $WOK/$PACKAGE/tmp/originial-$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