> Since the source for linux-backports-modules-2.6.31 is not a standard
> linux tarball I've modified the deblob script to make it search for
> alternative paths for files to deblob. A patch is attached.
Duh! I forgot some changes, this patch should do the trick.
--- ../deblob-2.6.31 2010-03-12 13:25:21.122384843 +0000
+++ DATA/linux/deblob/deblob-2.6.31 2010-03-12 14:05:26.643008917 +0000
@@ -47,6 +47,8 @@
# from 1 if changes are needed that require rebuilding the tarball.
kver=2.6.31 extra=2
+filelist="filelist"
+
case $1 in
--force)
echo "WARNING: Using the force, ignored errors will be" >&2
@@ -80,9 +82,29 @@
fi
filetest () {
- if [ ! -f $1 ]; then
- die $1 does not exist, something is wrong && return 1
- fi
+ export FILE=$1
+ if ! [ -f $1 ]
+ then
+ if [ $( basename $1) = Makefile ] || [ $( basename $1) = Kconfig ]
+ then
+ die File not found: $1
+ return 1
+ fi
+
+ file=$( basename $1)
+ [ -f $filelist ] || find > $filelist
+ if alternatives=$(egrep /$file$ $filelist)
+ then
+ die File not found: $1
+ echo WARNING: alternative\(s\) to $1 found: $alternatives
+ export FILE=$(echo $alternatives | cut -d ' ' -f 1)
+ echo WARNING: Deblobbing the first alternative: $FILE
+ return 0
+ else
+ die File not found: $1, no alternatives found
+ fi
+ return 1
+ fi
}
announce () {
@@ -93,8 +115,8 @@
clean_file () {
#$1 = filename
filetest $1 || return
- rm $1
- echo $1: removed
+ rm $FILES
+ echo $FILES: removed
}
check_changed () {
@@ -110,13 +132,13 @@
#$1 = filename
filetest $1 || return
if $have_check; then
- name=$1
+ name=$FILE
set fnord "$@" -d
shift 2
$check "$@" -i linux-$kver $name > $name.deblob
check_changed $name && echo $name: removed blobs
else
- clean_file $1
+ clean_file $FILE
fi
}
@@ -138,7 +160,7 @@
if test -f $2; then
die $2 exists, something is wrong && return
fi
- clean_blob $1 -s 4
+ clean_blob $FILE -s 4
dummy_blob $2
}
@@ -148,7 +170,7 @@
if test -f $2; then
die $2 exists, something is wrong && return
fi
- clean_file $1
+ clean_file $FILE
dummy_blob $2
}
@@ -167,8 +189,8 @@
filetest $1 || return
sed "/^config \\($2\\)\$/{p;i\
depends on NONFREE
-d;}" $1 > $1.deblob
- check_changed $1 && echo $1: marked config $2 as depending on NONFREE
+d;}" $FILE > $FILE.deblob
+ check_changed $FILE && echo $FILE: marked config $2 as depending on NONFREE
}
clean_mk () {
@@ -188,9 +210,9 @@
clean_sed () {
#$1 = sed-script $2 = file $3 = comment
filetest $2 || return
- sed -e "$1" "$2" > "$2".deblob || {
+ sed -e "$1" "$FILE" > "$FILE".deblob || {
die $2: failed: ${3-applied sed script $1} && return 1; }
- check_changed $2 && echo $2: ${3-applied sed script $1}
+ check_changed $FILE && echo $FILE: ${3-applied sed script $1}
}
reject_firmware () {
@@ -198,7 +220,7 @@
filetest $1 || return
clean_sed '
s,request\(_ihex\)\?_firmware\(_nowait\)\?,reject_firmware\2,g
-' "$1" 'disabled non-Free firmware-loading machinery'
+' "$FILE" 'disabled non-Free firmware-loading machinery'
}
maybe_reject_firmware () {
@@ -206,7 +228,7 @@
filetest $1 || return
clean_sed '
s,request_firmware\(_nowait\)\?,maybe_reject_firmware\1,g
-' "$1" 'retain Free firmware-loading machinery, disabling non-Free one'
+' "$FILE" 'retain Free firmware-loading machinery, disabling non-Free one'
}
undefine_macro () {
_______________________________________________
linux-libre mailing list
[email protected]
http://www.fsfla.org/cgi-bin/mailman/listinfo/linux-libre