classes/recipes/lib: Fix various python whitespace issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 May 2013 12:55:53 +0000 (13:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 May 2013 13:06:51 +0000 (14:06 +0100)
There are some left over tab characters in the python functions. This
removes them and resolves python 3 errors.

(From OE-Core rev: fafeb381c48291fa65c634c01c244843c8d7fad3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass
meta/classes/multilib_global.bbclass
meta/lib/oe/qa.py
meta/lib/oe/sstatesig.py
meta/recipes-core/meta/external-sourcery-toolchain.bb
meta/recipes-devtools/cmake/cmake_2.8.10.2.bb
meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
meta/recipes-kernel/linux/linux-dtb.inc

index 336beaa..41007f8 100644 (file)
@@ -173,10 +173,10 @@ def package_qa_check_rpath(file,name, d, elf, messages):
     import re
     rpath_re = re.compile("\s+RPATH\s+(.*)")
     for line in phdrs.split("\n"):
-       m = rpath_re.match(line)
-       if m:
-           rpath = m.group(1)
-           for dir in bad_dirs:
+        m = rpath_re.match(line)
+        if m:
+            rpath = m.group(1)
+            for dir in bad_dirs:
                 if dir in rpath:
                     messages.append("package %s contains bad RPATH %s in file %s" % (name, rpath, file))
 
@@ -202,13 +202,13 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
     import re
     rpath_re = re.compile("\s+RPATH\s+(.*)")
     for line in phdrs.split("\n"):
-       m = rpath_re.match(line)
-       if m:
-          rpath = m.group(1)
-          if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
-             # The dynamic linker searches both these places anyway.  There is no point in
-             # looking there again.
-             messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
+        m = rpath_re.match(line)
+        if m:
+            rpath = m.group(1)
+            if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
+                # The dynamic linker searches both these places anyway.  There is no point in
+                # looking there again.
+                messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
 
 QAPATHTEST[dev-so] = "package_qa_check_dev"
 def package_qa_check_dev(path, name, d, elf, messages):
@@ -463,7 +463,7 @@ def package_qa_textrel(path, name, d, elf, messages):
     textrel_re = re.compile("\s+TEXTREL\s+")
     for line in phdrs.split("\n"):
         if textrel_re.match(line):
-          sane = False
+            sane = False
 
     if not sane:
         messages.append("ELF binary '%s' has relocations in .text" % path)
@@ -498,7 +498,7 @@ def package_qa_hash_style(path, name, d, elf, messages):
         if "GNU_HASH" in line:
             sane = True
         if "[mips32]" in line or "[mips64]" in line:
-           sane = True
+            sane = True
 
     if has_syms and not sane:
         messages.append("No GNU_HASH in the elf binary: '%s'" % path)
index 529e82a..85f2d8d 100644 (file)
@@ -5,7 +5,7 @@ python multilib_virtclass_handler_global () {
     if isinstance(e, bb.event.RecipePreFinalise):
         for v in e.data.getVar("MULTILIB_VARIANTS", True).split():
             if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None:
-              e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
+                e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v)
 
     variant = e.data.getVar("BBEXTENDVARIANT", True)
 
index 4777ddc..c4376f0 100644 (file)
@@ -72,7 +72,7 @@ class ELFFile:
         return ord(self.data[ELFFile.EI_ABIVERSION])
 
     def abiSize(self):
-       return self.bits
+        return self.bits
 
     def isLittleEndian(self):
         return self.sex == "<"
index 79a410e..852fb7e 100644 (file)
@@ -108,16 +108,16 @@ def find_siginfo(pn, taskname, taskhashlist, d):
     foundall = False
     import glob
     for fullpath in glob.glob(filespec):
-       match = False
-       if taskhashlist:
-           for taskhash in taskhashlist:
-               if fullpath.endswith('.%s' % taskhash):
-                   hashfiles[taskhash] = fullpath
-                   if len(hashfiles) == len(taskhashlist):
-                       foundall = True
-                       break
-       else:
-           filedates[fullpath] = os.stat(fullpath).st_mtime
+        match = False
+        if taskhashlist:
+            for taskhash in taskhashlist:
+                if fullpath.endswith('.%s' % taskhash):
+                    hashfiles[taskhash] = fullpath
+                    if len(hashfiles) == len(taskhashlist):
+                        foundall = True
+                        break
+        else:
+            filedates[fullpath] = os.stat(fullpath).st_mtime
 
     if len(filedates) < 2 and not foundall:
         # That didn't work, look in sstate-cache
index 24c7ce8..5fed30a 100644 (file)
@@ -142,6 +142,6 @@ CSL_VER_MAIN ??= ""
 
 python () {
     if not d.getVar("CSL_VER_MAIN"):
-       raise bb.parse.SkipPackage("External CSL toolchain not configured (CSL_VER_MAIN not set).")
+        raise bb.parse.SkipPackage("External CSL toolchain not configured (CSL_VER_MAIN not set).")
 }
 
index ce398dd..65f75b4 100644 (file)
@@ -17,11 +17,11 @@ python () {
     docdir=d.getVar("docdir", True)
 
     if not docdir.startswith(prefix):
-       raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
+        raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
 
     docdir_stripped = docdir[len(prefix):]
     if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
-       docdir_stripped = docdir_stripped[1:]
+        docdir_stripped = docdir_stripped[1:]
 
     d.setVar("docdir_stripped", docdir_stripped)
 }
index 962ca75..96fe2ff 100644 (file)
@@ -7,9 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 python __anonymous () {
     major = d.getVar("PV",True).split('.')[0]
     if major == "3":
-       d.setVar("HEADER_FETCH_VER", "3.0")
+        d.setVar("HEADER_FETCH_VER", "3.0")
     else:
-       d.setVar("HEADER_FETCH_VER", "2.6")
+        d.setVar("HEADER_FETCH_VER", "2.6")
 }
 
 inherit kernel-arch
index 58b93a1..7747718 100644 (file)
@@ -5,10 +5,10 @@ KERNEL_DEVICETREE_FLAGS ?= "-R 8 -p 0x3000"
 python __anonymous () {
     devicetree = d.getVar("KERNEL_DEVICETREE", True) or ''
     if devicetree:
-       depends = d.getVar("DEPENDS", True)
-       d.setVar("DEPENDS", "%s dtc-native" % depends)
-       packages = d.getVar("PACKAGES", True)
-       d.setVar("PACKAGES", "%s kernel-devicetree" % packages)
+        depends = d.getVar("DEPENDS", True)
+        d.setVar("DEPENDS", "%s dtc-native" % depends)
+        packages = d.getVar("PACKAGES", True)
+        d.setVar("PACKAGES", "%s kernel-devicetree" % packages)
 }
 
 do_install_append() {