wok-next diff linux/stuff/tools/copy_modules.sh @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | 960a052d15d3 |
children |
line diff
1.1 --- a/linux/stuff/tools/copy_modules.sh Sat Jan 21 17:27:31 2017 +0200 1.2 +++ b/linux/stuff/tools/copy_modules.sh Sat Nov 21 14:32:44 2020 +0100 1.3 @@ -58,21 +58,29 @@ 1.4 while read rule_name rule_value; do 1.5 [ "$rule_name" != 'linux' ] && continue 1.6 list_modules $rule_value >> "$modlist" 2>/dev/null 1.7 - done < "${wanted_stuff:-$stuff}/split.rules" 1.8 + done < "$stuff/split.rules" 1.9 ;; 1.10 esac 1.11 1.12 -# A.3. If package depends on other package - make these modules "restricted" (excluded) too 1.13 -if [ "$DEPENDS" != "$WANTED" ]; then 1.14 +# A.3. Simulate deprecated (for receipts v2) variable $WANTED 1.15 +case $PACKAGE in 1.16 + linux-libre|linux64|linux) wanted='';; 1.17 + linux-libre-*) wanted='linux-libre';; 1.18 + linux64-*) wanted='linux64';; 1.19 + linux-*) wanted='linux';; 1.20 +esac 1.21 + 1.22 +# A.4. If package depends on other package - make these modules "restricted" (excluded) too 1.23 +if [ "$DEPENDS" != "$wanted" ]; then 1.24 for i in $DEPENDS; do 1.25 - if [ "$i" != "$WANTED" ]; then 1.26 + if [ "$i" != "$wanted" ]; then 1.27 pkg_subname=${i#linux-libre-} 1.28 pkg_subname=${pkg_subname#linux*-} 1.29 1.30 while read rule_name rule_value; do 1.31 [ "$pkg_subname" != "$rule_name" ] && continue 1.32 list_modules $rule_value >> "$modlist" 2>/dev/null 1.33 - done < "${wanted_stuff:-$stuff}/split.rules" 1.34 + done < "$stuff/split.rules" 1.35 fi 1.36 done 1.37 fi 1.38 @@ -99,7 +107,7 @@ 1.39 mkdir -p $fs/$dir 1.40 cp -a $modroot/$module $fs/$dir 1.41 done 1.42 -done < "${wanted_stuff:-$stuff}/split.rules" 1.43 +done < "$stuff/split.rules" 1.44 1.45 # B.3. Clean 1.46 rm "$modlist"