mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e4c35790d6
commit
e40995e569
@@ -362,6 +362,7 @@ def dumpdata(d):
|
||||
def create_diff_gz(d):
|
||||
'''creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.g gz for mapping all content in 's' including patches to xxx.diff.gz'''
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
work_dir = d.getVar('WORKDIR', True)
|
||||
exclude_from = d.getVar('ARCHIVE_EXCLUDE_FROM', True).split()
|
||||
@@ -387,7 +388,7 @@ def create_diff_gz(d):
|
||||
try:
|
||||
shutil.copy(i, dest)
|
||||
except IOError:
|
||||
os.system('fakeroot cp -rf ' + i + " " + dest )
|
||||
subprocess.call('fakeroot cp -rf ' + i + " " + dest, shell=True)
|
||||
|
||||
bb.note("Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz")
|
||||
cmd = "LC_ALL=C TZ=UTC0 diff --exclude-from=" + work_dir + "/temp/exclude-from-file -Naur " + s + '.org' + ' ' + s + " | gzip -c > " + diff_file
|
||||
|
||||
Reference in New Issue
Block a user