summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-08-22 16:36:53 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-08-23 16:05:42 +0800
commitf3b19c25a3c5235bfa3e28a58961a09aeb0bef47 (patch)
treefb0ee9bf6a3690d07e1207c958e38486bb2d525f
parent3b9562e49fad08bde7eff868be27af6d4439cb29 (diff)
downloadopenembedded-core-contrib-rbt/subprocess.tar.gz
openembedded-core-contrib-rbt/subprocess.tar.bz2
openembedded-core-contrib-rbt/subprocess.zip
compress_doc.bbclass: Clean up getstatusoutput usagerbt/subprocess
Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/compress_doc.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
index 069d53492e..45bb8fff65 100644
--- a/meta/classes/compress_doc.bbclass
+++ b/meta/classes/compress_doc.bbclass
@@ -79,6 +79,7 @@ def _collect_hardlink(hardlink_dict, file):
return hardlink_dict
def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False):
+ import subprocess
for target in hardlink_dict:
if decompress:
compress_format = _get_compress_format(target, shell_cmds.keys())
@@ -87,7 +88,7 @@ def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False
else:
cmd = "%s -f %s" % (shell_cmds[compress_mode], target)
bb.note('compress hardlink %s' % target)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
return
@@ -176,7 +177,7 @@ def compress_doc(topdir, compress_mode, compress_cmds):
# Normal file
elif os.path.isfile(file):
cmd = "%s %s" % (compress_cmds[compress_mode], file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
continue
@@ -206,7 +207,7 @@ def decompress_doc(topdir, compress_mode, decompress_cmds):
# Normal file
elif os.path.isfile(file):
cmd = "%s %s" % (decompress_cmds[compress_format], file)
- (retval, output) = oe.utils.getstatusoutput(cmd)
+ (retval, output) = subprocess.getstatusoutput(cmd)
if retval:
bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
continue