wok annotate linux/stuff/check_modules.sh @ rev 8767

Updated physfs WGET_URL. Added wget to build depends make that work.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Feb 21 02:01:47 2011 +0000 (2011-02-21)
parents 1d89aa1672da
children 2010b1abc210
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@5640 12 src="$WOK/linux/linux-$VERSION"
pankso@5640 13
pankso@5640 14 cd $src
slaxemulator@8728 15 mkdir -p $WOK/$PACKAGE/tmp
slaxemulator@8728 16 rm -f $WOK/$PACKAGE/tmp/*
pankso@5640 17
pankso@5666 18 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs"
pankso@5666 19 echo "======================================================================"
pankso@5666 20
pankso@5640 21 # create a packaged modules list
slaxemulator@8728 22 cat ../stuff/modules-"$VERSION".list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list
pankso@5640 23
pankso@5640 24 for i in $(cd $WOK; ls -d linux-*)
pankso@5640 25 do
pankso@5640 26 tazpath="taz/$i-$VERSION"
pankso@5640 27 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
pankso@5638 28 do
slaxemulator@8728 29 basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list
pankso@5640 30 done
pankso@5640 31 done
pankso@5640 32 # get the original list in .config
pankso@5640 33 for i in $(find $_pkg -iname "*.ko.gz")
pankso@5640 34 do
slaxemulator@8728 35 basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list
pankso@5640 36 done
pankso@5640 37 # compare original .config and pkged modules
slaxemulator@8728 38 for i in $(cat $WOK/$PACKAGE/tmp/originial-$VERSION.list)
pankso@5640 39 do
slaxemulator@8728 40 if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then
pankso@5640 41 modpath=`find $_pkg -iname "$i"`
pankso@5666 42 echo "Orphan module: $i"
slaxemulator@8728 43 echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list
jozee@3509 44 fi
pankso@5640 45 done
slaxemulator@8728 46 if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then
pankso@5640 47 echo "======================================================================"
gokhlayeh@8302 48 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n"
pankso@5640 49 else
pankso@5640 50 echo -e "\nAll modules are packaged\n"
pankso@5666 51 echo "======================================================================"
pankso@5666 52 echo ""
slaxemulator@8728 53 rm -rf $WOK/$PACKAGE/tmp
pankso@5640 54 fi