wok annotate linux-libre/stuff/check_modules.sh @ rev 16125

ARM: add xorg-libXdamage and conky
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 23 22:52:11 2014 +0100 (2014-03-23)
parents d51bf7b42b2a
children
rev   line source
gokhlayeh@9257 1 #!/bin/sh
gokhlayeh@9257 2 # Echo any module in kernel .config that's not added to one of linux-libre-* pkgs
gokhlayeh@9257 3 # (c) SliTaz - GNU General Public License.
gokhlayeh@9257 4 # 20090618 <jozee@slitaz.org>
gokhlayeh@9257 5 # 20100528 <pankso@slitaz.org>
gokhlayeh@9257 6 #
gokhlayeh@9257 7 #. /etc/slitaz/slitaz.conf
gokhlayeh@9257 8
gokhlayeh@9257 9 #WOK=$LOCAL_REPOSITORY/wok
gokhlayeh@9257 10 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/')
gokhlayeh@9257 11 VERSION=`grep ^VERSION= $WOK/linux-libre/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
pascal@14204 12 src="$WOK/linux-libre/source/linux-libre-$VERSION"
gokhlayeh@9257 13
gokhlayeh@9257 14 cd $src
pascal@14203 15 tmp=$WOK/${PACKAGE:-linux-libre}/tmp
pascal@14203 16 mkdir -p $tmp 2>/dev/null
pascal@14203 17 rm -f $tmp/*
gokhlayeh@9257 18
gokhlayeh@9257 19 echo -e "\nChecking for modules selected in .config but not in linux-libre-* pkgs"
gokhlayeh@9257 20 echo "======================================================================"
gokhlayeh@9257 21
gokhlayeh@9257 22 # create a packaged modules list
pascal@14203 23 cat $WOK/linux-libre/stuff/modules-"$VERSION".list >> $tmp/pkgs-modules-"$VERSION".list
gokhlayeh@9257 24
pascal@14203 25 for i in $(cd $WOK; grep -l '^WANTED="linux-libre"' */receipt | sed 's|/receipt||g')
gokhlayeh@9257 26 do
pascal@14203 27 tazpath="taz/$i-*"
pascal@14203 28 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z")
gokhlayeh@11396 29 do
pascal@14203 30 basename $j >> $tmp/pkgs-modules-"$VERSION".list
gokhlayeh@11396 31 done
gokhlayeh@9257 32 done
gokhlayeh@9257 33 # get the original list in .config
pascal@14203 34 for i in $(find $_pkg -iname "*.ko.?z")
gokhlayeh@9257 35 do
pascal@14203 36 basename $i
pascal@14203 37 done > $tmp/original-"$VERSION".list
gokhlayeh@9257 38 # compare original .config and pkged modules
pascal@14203 39 for i in $(cat $tmp/original-$VERSION.list)
gokhlayeh@11396 40 do
pascal@14203 41 if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then
gokhlayeh@9257 42 modpath=`find $_pkg -iname "$i"`
gokhlayeh@9257 43 echo "Orphan module: $i"
pascal@14203 44 echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list
gokhlayeh@9257 45 fi
gokhlayeh@9257 46 done
pascal@14203 47 if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then
gokhlayeh@9257 48 echo "======================================================================"
gokhlayeh@9257 49 echo -e "Check linux-libre/tmp/unpackaged-modules-$VERSION.list for mod path\n"
gokhlayeh@9257 50 else
gokhlayeh@9257 51 echo -e "\nAll modules are packaged\n"
gokhlayeh@9257 52 echo "======================================================================"
gokhlayeh@9257 53 echo ""
pascal@14203 54 rm -rf $tmp
gokhlayeh@9257 55 fi