diff options
author | Martin Ertsaas <martiert@gmail.com> | 2013-01-10 09:50:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-15 08:09:29 +0000 |
commit | 73b34d43633717b99e4f2f669939939cfa59eecb (patch) | |
tree | 4274fefb5c500c94927a5cab7ed6738157ee57eb /meta/classes/sstate.bbclass | |
parent | 7a0fd7145461d3feb9fe7900a39376d556e655d6 (diff) | |
download | openembedded-core-73b34d43633717b99e4f2f669939939cfa59eecb.tar.gz openembedded-core-73b34d43633717b99e4f2f669939939cfa59eecb.tar.bz2 openembedded-core-73b34d43633717b99e4f2f669939939cfa59eecb.zip |
sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 10 |
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() { } def sstate_hardcode_path(d): - import subprocess + import subprocess, platform # Need to remove hardcoded paths and fix these when we install the # staging packages. @@ -390,7 +390,7 @@ def sstate_hardcode_path(d): else: sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host) - + fixmefn = sstate_builddir + "fixmepath" sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True) @@ -399,9 +399,13 @@ def sstate_hardcode_path(d): # fixmepath file needs relative paths, drop sstate_builddir prefix sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn) + xargs_no_empty_run_cmd = '--no-run-if-empty' + if platform.system() == 'Darwin': + xargs_no_empty_run_cmd = '' + # Limit the fixpaths and sed operations based on the initial grep search # This has the side effect of making sure the vfs cache is hot - 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) + 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) print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd) subprocess.call(sstate_hardcode_cmd, shell=True) |