Hello,

deblob (tested with gentoo-sources-2.6.39) is broken with python-3.1.

I have CONFIG_MICROCODE_INTEL=y. With python-2.6, the offending blob is 
simply patched out of microcode_intel.c. When run with python-3.1, the file 
is simply erased - resulting in the inability to build.

Attached is a small patch fixing things that are now illegal in python-3.1, 
which seems to solve the problem.

Best regards,
Michael
--- deblob-check-script	2011-07-21 23:25:06.000000000 +1000
+++ deblob-check-script	2011-07-22 00:44:04.000000000 +1000
@@ -70,13 +70,13 @@
         continue
 
     if verbose:
-            print 'looking for matches'
+            print('looking for matches')
             sfilenames = filenames
             while filenames != None:
                 if filenames[1] is None:
-                    print filenames[0]
+                    print(filenames[0])
                 else:
-                    print filenames[0] + ' within'
+                    print(filenames[0] + ' within')
                 filenames = filenames[1]
             filenames = sfilenames
 
@@ -91,25 +91,25 @@
         blobs = falses = 0
         while 1:
             if verbose:
-                print 'found match'
+                print('found match')
             what = match.lastgroup
 
             if what == 'cblob':
-                if verbose: print 'match is a blob context'
+                if verbose: print('match is a blob context')
                 pend = s.find ('\n', match.end()) + 1
                 if pend == 0:
                     pend = len(s)
                 p = match.start() + 1
-		blob_p = 2
+                blob_p = 2
             else:
                 blob_p = what == 'blob'
                 assert blob_p or what == 'falsepos'
 
                 if blob_p:
-                    if verbose: print 'match is a blob'
+                    if verbose: print('match is a blob')
                     blobs += 1
                 else:
-                    if verbose: print 'match is a false positive'
+                    if verbose: print('match is a false positive')
                     falses += 1
 
                 if blob_p and replace_blob or not blob_p and replace_falsepos:
@@ -141,7 +141,7 @@
             if not print_nomatch:
                 sfilenames = filenames
                 while filenames != None:
-                    print '::: ' + filenames[0] + ' :::'
+                    print('::: ' + filenames[0] + ' :::')
                     filenames = filenames[1]
                 filenames = sfilenames
             sys.stdout.write (s[pp:pend])
@@ -150,9 +150,9 @@
         if list_blob and blobs or list_falsepos and falses:
             while filenames != None:
                 if filenames[1] is None:
-                    print filenames[0]
+                    print(filenames[0])
                 else:
-                    print filenames[0] + ' within'
+                    print (filenames[0] + ' within')
                 filenames = filenames[1]
             exit (1)
 
@@ -160,7 +160,7 @@
         sys.stdout.write(s[pp:])
 
     if verbose:
-        print 'no further matches'
+        print('no further matches')
 
     s = '\n'
     filenames = nextfilenames

_______________________________________________
linux-libre mailing list
[email protected]
http://www.fsfla.org/cgi-bin/mailman/listinfo/linux-libre

Reply via email to