summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-11 17:33:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-19 10:24:50 +0100
commitbfd279de3275abbfaf3e630383ec244131e0375f (patch)
tree0d1c90461a890d21444f5d2afb13c52b302427f1 /meta/classes/sstate.bbclass
parent99203edda6f0b09d817454d656c100b7a8806b18 (diff)
downloadpoky-bfd279de3275abbfaf3e630383ec244131e0375f.tar.gz
Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass104
1 files changed, 52 insertions, 52 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index c2c5bd5c25..d572f0edcf 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -185,18 +185,18 @@ def sstate_installpkg(ss, d):
185 staging_target = d.getVar('STAGING_DIR_TARGET', True) 185 staging_target = d.getVar('STAGING_DIR_TARGET', True)
186 staging_host = d.getVar('STAGING_DIR_HOST', True) 186 staging_host = d.getVar('STAGING_DIR_HOST', True)
187 187
188 if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d): 188 if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
189 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIR:%s:g'" % (staging) 189 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIR:%s:g'" % (staging)
190 elif bb.data.inherits_class('cross', d): 190 elif bb.data.inherits_class('cross', d):
191 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIR:%s:g'" % (staging_target, staging) 191 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIR:%s:g'" % (staging_target, staging)
192 else: 192 else:
193 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host) 193 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
194 194
195 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed 195 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
196 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd) 196 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
197 197
198 print "Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd) 198 print "Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd)
199 subprocess.call(sstate_hardcode_cmd, shell=True) 199 subprocess.call(sstate_hardcode_cmd, shell=True)
200 200
201 # Need to remove this or we'd copy it into the target directory and may 201 # Need to remove this or we'd copy it into the target directory and may
202 # conflict with another writer 202 # conflict with another writer
@@ -310,50 +310,50 @@ python sstate_cleanall() {
310} 310}
311 311
312def sstate_hardcode_path(d): 312def sstate_hardcode_path(d):
313 import subprocess 313 import subprocess
314 314
315 # Need to remove hardcoded paths and fix these when we install the 315 # Need to remove hardcoded paths and fix these when we install the
316 # staging packages. 316 # staging packages.
317 # 317 #
318 # Note: the logic in this function needs to match the reverse logic 318 # Note: the logic in this function needs to match the reverse logic
319 # in sstate_installpkg(ss, d) 319 # in sstate_installpkg(ss, d)
320 320
321 staging = d.getVar('STAGING_DIR', True) 321 staging = d.getVar('STAGING_DIR', True)
322 staging_target = d.getVar('STAGING_DIR_TARGET', True) 322 staging_target = d.getVar('STAGING_DIR_TARGET', True)
323 staging_host = d.getVar('STAGING_DIR_HOST', True) 323 staging_host = d.getVar('STAGING_DIR_HOST', True)
324 sstate_builddir = d.getVar('SSTATE_BUILDDIR', True) 324 sstate_builddir = d.getVar('SSTATE_BUILDDIR', True)
325 325
326 if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d): 326 if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
327 sstate_grep_cmd = "grep -l -e '%s'" % (staging) 327 sstate_grep_cmd = "grep -l -e '%s'" % (staging)
328 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging) 328 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
329 elif bb.data.inherits_class('cross', d): 329 elif bb.data.inherits_class('cross', d):
330 sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging) 330 sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging)
331 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging) 331 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
332 else: 332 else:
333 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) 333 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
334 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host) 334 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
335 335
336 fixmefn = sstate_builddir + "fixmepath" 336 fixmefn = sstate_builddir + "fixmepath"
337 337
338 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True) 338 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
339 sstate_filelist_cmd = "tee %s" % (fixmefn) 339 sstate_filelist_cmd = "tee %s" % (fixmefn)
340 340
341 # fixmepath file needs relative paths, drop sstate_builddir prefix 341 # fixmepath file needs relative paths, drop sstate_builddir prefix
342 sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn) 342 sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
343 343
344 # Limit the fixpaths and sed operations based on the initial grep search 344 # Limit the fixpaths and sed operations based on the initial grep search
345 # This has the side effect of making sure the vfs cache is hot 345 # This has the side effect of making sure the vfs cache is hot
346 sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd) 346 sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
347 347
348 print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd) 348 print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
349 subprocess.call(sstate_hardcode_cmd, shell=True) 349 subprocess.call(sstate_hardcode_cmd, shell=True)
350 350
351 # If the fixmefn is empty, remove it.. 351 # If the fixmefn is empty, remove it..
352 if os.stat(fixmefn).st_size == 0: 352 if os.stat(fixmefn).st_size == 0:
353 os.remove(fixmefn) 353 os.remove(fixmefn)
354 else: 354 else:
355 print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd) 355 print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)
356 subprocess.call(sstate_filelist_relative_cmd, shell=True) 356 subprocess.call(sstate_filelist_relative_cmd, shell=True)
357 357
358def sstate_package(ss, d): 358def sstate_package(ss, d):
359 import oe.path 359 import oe.path