diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 14:28:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:12:59 +0000 |
commit | e45db24bbeacfe4754638eafa9682258b994307c (patch) | |
tree | 035f6688afffcb18cb58fa4c1e2024a5b2024cfc /meta/classes/package.bbclass | |
parent | d81aa06ece4e5dcae5f91ab0ae8958d58cd3419f (diff) | |
download | poky-e45db24bbeacfe4754638eafa9682258b994307c.tar.gz |
package: Don't export PATH
PATH is already exported, we don't need to do this each time we run
something, its just noise and overhead.
(From OE-Core rev: 060f617cea4ea0a5af28d31ea19c0387e9773fce)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 1858836697..d93783f83b 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -233,7 +233,6 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): | |||
233 | import commands, stat, subprocess | 233 | import commands, stat, subprocess |
234 | 234 | ||
235 | dvar = d.getVar('PKGD', True) | 235 | dvar = d.getVar('PKGD', True) |
236 | pathprefix = "export PATH=%s; " % d.getVar('PATH', True) | ||
237 | objcopy = d.getVar("OBJCOPY", True) | 236 | objcopy = d.getVar("OBJCOPY", True) |
238 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") | 237 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") |
239 | workdir = d.getVar("WORKDIR", True) | 238 | workdir = d.getVar("WORKDIR", True) |
@@ -252,14 +251,14 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): | |||
252 | 251 | ||
253 | # We need to extract the debug src information here... | 252 | # We need to extract the debug src information here... |
254 | if debugsrcdir: | 253 | if debugsrcdir: |
255 | subprocess.call("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True) | 254 | subprocess.call("'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True) |
256 | 255 | ||
257 | bb.mkdirhier(os.path.dirname(debugfile)) | 256 | bb.mkdirhier(os.path.dirname(debugfile)) |
258 | 257 | ||
259 | subprocess.call("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile), shell=True) | 258 | subprocess.call("'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile), shell=True) |
260 | 259 | ||
261 | # Set the debuglink to have the view of the file path on the target | 260 | # Set the debuglink to have the view of the file path on the target |
262 | subprocess.call("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file), shell=True) | 261 | subprocess.call("'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file), shell=True) |
263 | 262 | ||
264 | if newmode: | 263 | if newmode: |
265 | os.chmod(file, origmode) | 264 | os.chmod(file, origmode) |
@@ -275,7 +274,6 @@ def copydebugsources(debugsrcdir, d): | |||
275 | sourcefile = d.expand("${WORKDIR}/debugsources.list") | 274 | sourcefile = d.expand("${WORKDIR}/debugsources.list") |
276 | if debugsrcdir and os.path.isfile(sourcefile): | 275 | if debugsrcdir and os.path.isfile(sourcefile): |
277 | dvar = d.getVar('PKGD', True) | 276 | dvar = d.getVar('PKGD', True) |
278 | pathprefix = "export PATH=%s; " % d.getVar('PATH', True) | ||
279 | strip = d.getVar("STRIP", True) | 277 | strip = d.getVar("STRIP", True) |
280 | objcopy = d.getVar("OBJCOPY", True) | 278 | objcopy = d.getVar("OBJCOPY", True) |
281 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") | 279 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") |
@@ -322,7 +320,6 @@ def runstrip(file, elftype, d): | |||
322 | 320 | ||
323 | import commands, stat, subprocess | 321 | import commands, stat, subprocess |
324 | 322 | ||
325 | pathprefix = "export PATH=%s; " % d.getVar('PATH', True) | ||
326 | strip = d.getVar("STRIP", True) | 323 | strip = d.getVar("STRIP", True) |
327 | 324 | ||
328 | newmode = None | 325 | newmode = None |
@@ -345,7 +342,7 @@ def runstrip(file, elftype, d): | |||
345 | stripcmd = "'%s' %s '%s'" % (strip, extraflags, file) | 342 | stripcmd = "'%s' %s '%s'" % (strip, extraflags, file) |
346 | bb.debug(1, "runstrip: %s" % stripcmd) | 343 | bb.debug(1, "runstrip: %s" % stripcmd) |
347 | 344 | ||
348 | ret = subprocess.call("%s%s" % (pathprefix, stripcmd), shell=True) | 345 | ret = subprocess.call(stripcmd, shell=True) |
349 | 346 | ||
350 | if newmode: | 347 | if newmode: |
351 | os.chmod(file, origmode) | 348 | os.chmod(file, origmode) |
@@ -747,8 +744,7 @@ python split_and_strip_files () { | |||
747 | # 16 - kernel module | 744 | # 16 - kernel module |
748 | def isELF(path): | 745 | def isELF(path): |
749 | type = 0 | 746 | type = 0 |
750 | pathprefix = "export PATH=%s; " % d.getVar('PATH', True) | 747 | ret, result = commands.getstatusoutput("file '%s'" % path) |
751 | ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path)) | ||
752 | 748 | ||
753 | if ret: | 749 | if ret: |
754 | bb.error("split_and_strip_files: 'file %s' failed" % path) | 750 | bb.error("split_and_strip_files: 'file %s' failed" % path) |