summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorMartin Ertsaas <martiert@gmail.com>2013-01-10 09:50:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-15 08:10:14 +0000
commit2c7bba51a6f08d5124714ccf5db0199f31a7d203 (patch)
tree1b9e3f1808aec84449a1c4dc26d28fae56b768db /meta/classes/sstate.bbclass
parent66d0b1d4d2cef459107eafc996c878ff5e66a8fc (diff)
downloadpoky-2c7bba51a6f08d5124714ccf5db0199f31a7d203.tar.gz
sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported.
(From OE-Core rev: 73b34d43633717b99e4f2f669939939cfa59eecb) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 68fd996931..e92fbae1f6 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -368,7 +368,7 @@ python sstate_cleanall() {
368} 368}
369 369
370def sstate_hardcode_path(d): 370def sstate_hardcode_path(d):
371 import subprocess 371 import subprocess, platform
372 372
373 # Need to remove hardcoded paths and fix these when we install the 373 # Need to remove hardcoded paths and fix these when we install the
374 # staging packages. 374 # staging packages.
@@ -390,7 +390,7 @@ def sstate_hardcode_path(d):
390 else: 390 else:
391 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) 391 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
392 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host) 392 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
393 393
394 fixmefn = sstate_builddir + "fixmepath" 394 fixmefn = sstate_builddir + "fixmepath"
395 395
396 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True) 396 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
@@ -399,9 +399,13 @@ def sstate_hardcode_path(d):
399 # fixmepath file needs relative paths, drop sstate_builddir prefix 399 # fixmepath file needs relative paths, drop sstate_builddir prefix
400 sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn) 400 sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
401 401
402 xargs_no_empty_run_cmd = '--no-run-if-empty'
403 if platform.system() == 'Darwin':
404 xargs_no_empty_run_cmd = ''
405
402 # Limit the fixpaths and sed operations based on the initial grep search 406 # Limit the fixpaths and sed operations based on the initial grep search
403 # This has the side effect of making sure the vfs cache is hot 407 # This has the side effect of making sure the vfs cache is hot
404 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) 408 sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
405 409
406 print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd) 410 print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
407 subprocess.call(sstate_hardcode_cmd, shell=True) 411 subprocess.call(sstate_hardcode_cmd, shell=True)