classes: Clean up anonymous function whitespace
authorRichard Purdie <rpurdie@rpsys.net>
Mon, 20 Nov 2006 09:40:17 +0000 (09:40 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Mon, 20 Nov 2006 09:40:17 +0000 (09:40 +0000)
classes/base.bbclass
classes/ccache.inc
classes/ccdv.bbclass
classes/update-alternatives.bbclass
classes/update-rc.d.bbclass

index 18e6aec..5404b5f 100644 (file)
@@ -688,17 +688,17 @@ def base_after_parse_two(d):
 
     need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
     if need_machine:
-           import re
-           this_machine = bb.data.getVar('MACHINE', d, 1)
-           if this_machine and not re.match(need_machine, this_machine):
-                   raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+        import re
+        this_machine = bb.data.getVar('MACHINE', d, 1)
+        if this_machine and not re.match(need_machine, this_machine):
+            raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
     pn = bb.data.getVar('PN', d, 1)
 
     # OBSOLETE in bitbake 1.7.4
     srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
     if srcdate != None:
-           bb.data.setVar('SRCDATE', srcdate, d)
+        bb.data.setVar('SRCDATE', srcdate, d)
 
     use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1)
     if use_nls != None:
@@ -715,7 +715,7 @@ def base_after_parse(d):
         return
     paths = []
     for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
-           paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
+        paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
     for s in bb.data.getVar('SRC_URI', d, 1).split():
         local = bb.data.expand(bb.fetch.localpath(s, d), d)
         for mp in paths:
index 5e93561..d830a1b 100644 (file)
@@ -5,7 +5,7 @@
 CCACHE_DIR_TARGET = "${TMPDIR}/ccache"
 
 python () {
-       if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
-               bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d)
-               bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d)
+    if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+        bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d)
+        bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d)
 }
index edd151e..a28ea67 100644 (file)
@@ -1,10 +1,10 @@
 python () {
-       if bb.data.getVar('PN', d, 1) in ['ccdv-native']:
-               if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
-                       bb.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", bb.data.getVar("DEPENDS", d, 1) or ""), d)
-                       bb.data.setVar("CC", '%s %s' % ("ccdv", bb.data.getVar("CC", d, 1) or ""), d)
-                       bb.data.setVar("BUILD_CC", '%s %s' % ("ccdv", bb.data.getVar("BUILD_CC", d, 1) or ""), d)
-                       bb.data.setVar("CCLD", '%s %s' % ("ccdv", bb.data.getVar("CCLD", d, 1) or ""), d)
+    if bb.data.getVar('PN', d, 1) in ['ccdv-native']:
+        if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
+            bb.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", bb.data.getVar("DEPENDS", d, 1) or ""), d)
+            bb.data.setVar("CC", '%s %s' % ("ccdv", bb.data.getVar("CC", d, 1) or ""), d)
+            bb.data.setVar("BUILD_CC", '%s %s' % ("ccdv", bb.data.getVar("BUILD_CC", d, 1) or ""), d)
+            bb.data.setVar("CCLD", '%s %s' % ("ccdv", bb.data.getVar("CCLD", d, 1) or ""), d)
 }
 
 def quiet_libtool(bb,d):
index 2e24eee..c63581c 100644 (file)
@@ -10,7 +10,7 @@ update_alternatives_postrm() {
 update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
 }
 
-def updatealternativesafterparse(d):
+def update_alternatives_after_parse(d):
     import bb
     if bb.data.getVar('ALTERNATIVE_NAME', d) == None:
         raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
@@ -18,7 +18,7 @@ def updatealternativesafterparse(d):
         raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
 
 python __anonymous() {
-    updatealternativesafterparse(d)
+    update_alternatives_after_parse(d)
 }
 
 python populate_packages_prepend () {
index 581859a..9821eec 100644 (file)
@@ -30,10 +30,10 @@ update-rc.d $D ${INITSCRIPT_NAME} remove
 def update_rc_after_parse(d):
     import bb
     if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
-           if bb.data.getVar('INITSCRIPT_NAME', d) == None:
-                   raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
-           if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
-                   raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
+        if bb.data.getVar('INITSCRIPT_NAME', d) == None:
+            raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
+        if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
+            raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
 
 python __anonymous() {
     update_rc_after_parse(d)