# HG changeset patch # User Pascal Bellard # Date 1363253899 -3600 # Node ID d51bf7b42b2a4a5bfe61574d99112ff2bd4ee712 # Parent 2b1b306b8dde8656a15bde9ed2fd373cac2f6c4b linux-libre: fix check_modules.sh diff -r 2b1b306b8dde -r d51bf7b42b2a linux-libre/stuff/check_modules.sh --- a/linux-libre/stuff/check_modules.sh Thu Mar 14 05:13:26 2013 +0000 +++ b/linux-libre/stuff/check_modules.sh Thu Mar 14 10:38:19 2013 +0100 @@ -9,46 +9,47 @@ #WOK=$LOCAL_REPOSITORY/wok WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/') VERSION=`grep ^VERSION= $WOK/linux-libre/receipt | cut -d "=" -f2 | sed -e 's/"//g'` -src="$WOK/linux-libre/linux-$VERSION" +src="$WOK/linux-libre/source/linux-$VERSION" cd $src -mkdir -p $WOK/$PACKAGE/tmp -rm -f $WOK/$PACKAGE/tmp/* +tmp=$WOK/${PACKAGE:-linux-libre}/tmp +mkdir -p $tmp 2>/dev/null +rm -f $tmp/* echo -e "\nChecking for modules selected in .config but not in linux-libre-* pkgs" echo "======================================================================" # create a packaged modules list -cat ../stuff/modules-"$VERSION".list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list +cat $WOK/linux-libre/stuff/modules-"$VERSION".list >> $tmp/pkgs-modules-"$VERSION".list -for i in $(cd $WOK; ls -d linux-libre-*) +for i in $(cd $WOK; grep -l '^WANTED="linux-libre"' */receipt | sed 's|/receipt||g') do - tazpath="taz/$i-$VERSION" - for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz") + tazpath="taz/$i-*" + for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z") do - basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list + basename $j >> $tmp/pkgs-modules-"$VERSION".list done done # get the original list in .config -for i in $(find $_pkg -iname "*.ko.gz") +for i in $(find $_pkg -iname "*.ko.?z") do - basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list -done + basename $i +done > $tmp/original-"$VERSION".list # compare original .config and pkged modules -for i in $(cat $WOK/$PACKAGE/tmp/originial-$VERSION.list) +for i in $(cat $tmp/original-$VERSION.list) do - if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then + if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then modpath=`find $_pkg -iname "$i"` echo "Orphan module: $i" - echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list + echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list fi done -if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then +if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then echo "======================================================================" echo -e "Check linux-libre/tmp/unpackaged-modules-$VERSION.list for mod path\n" else echo -e "\nAll modules are packaged\n" echo "======================================================================" echo "" - rm -rf $WOK/$PACKAGE/tmp + rm -rf $tmp fi