summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-05-29 22:53:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:45 +0100
commite40995e569289598a1d9d71e19734402f2b54718 (patch)
tree108328e272a149da0e27dec0e0f0bebe602b80b8 /meta/classes/package_deb.bbclass
parente4c35790d6dc23a0933f188f52fa4434784e1d98 (diff)
downloadpoky-e40995e569289598a1d9d71e19734402f2b54718.tar.gz
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>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4096fa2b89..0a3e976ff7 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -205,6 +205,7 @@ deb_log_check() {
205python do_package_deb () { 205python do_package_deb () {
206 import re, copy 206 import re, copy
207 import textwrap 207 import textwrap
208 import subprocess
208 209
209 workdir = d.getVar('WORKDIR', True) 210 workdir = d.getVar('WORKDIR', True)
210 if not workdir: 211 if not workdir:
@@ -384,7 +385,7 @@ python do_package_deb () {
384 conffiles.close() 385 conffiles.close()
385 386
386 os.chdir(basedir) 387 os.chdir(basedir)
387 ret = os.system("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir)) 388 ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
388 if ret != 0: 389 if ret != 0:
389 bb.utils.prunedir(controldir) 390 bb.utils.prunedir(controldir)
390 bb.utils.unlockfile(lf) 391 bb.utils.unlockfile(lf)