> I'm trying to include linux-backports-modules -Ubuntu's
> wireless-compat package- in the final version of Trisquel 3.5. The
> list of backported modules can be seen here:
> http://packages.ubuntu.com/karmic-updates/amd64/linux-backports-modules-2.6.31-20-generic/filelist
> 
> I will use the deblob script on all the source, but I can remove all
> non-free modules first. Can someone review the list and mark those to
> be deleted? 

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.
--- ../deblob-2.6.31	2010-03-12 13:25:21.122384843 +0000
+++ DATA/linux/deblob/deblob-2.6.31	2010-03-12 13:37:47.862989651 +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 () {
@@ -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
 }
 
_______________________________________________
linux-libre mailing list
[email protected]
http://www.fsfla.org/cgi-bin/mailman/listinfo/linux-libre

Reply via email to