summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):
79 return hardlink_dict 79 return hardlink_dict
80 80
81def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False): 81def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False):
82 import subprocess
82 for target in hardlink_dict: 83 for target in hardlink_dict:
83 if decompress: 84 if decompress:
84 compress_format = _get_compress_format(target, shell_cmds.keys()) 85 compress_format = _get_compress_format(target, shell_cmds.keys())
@@ -87,7 +88,7 @@ def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False
87 else: 88 else:
88 cmd = "%s -f %s" % (shell_cmds[compress_mode], target) 89 cmd = "%s -f %s" % (shell_cmds[compress_mode], target)
89 bb.note('compress hardlink %s' % target) 90 bb.note('compress hardlink %s' % target)
90 (retval, output) = oe.utils.getstatusoutput(cmd) 91 (retval, output) = subprocess.getstatusoutput(cmd)
91 if retval: 92 if retval:
92 bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) 93 bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
93 return 94 return
@@ -176,7 +177,7 @@ def compress_doc(topdir, compress_mode, compress_cmds):
176 # Normal file 177 # Normal file
177 elif os.path.isfile(file): 178 elif os.path.isfile(file):
178 cmd = "%s %s" % (compress_cmds[compress_mode], file) 179 cmd = "%s %s" % (compress_cmds[compress_mode], file)
179 (retval, output) = oe.utils.getstatusoutput(cmd) 180 (retval, output) = subprocess.getstatusoutput(cmd)
180 if retval: 181 if retval:
181 bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) 182 bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
182 continue 183 continue
@@ -206,7 +207,7 @@ def decompress_doc(topdir, compress_mode, decompress_cmds):
206 # Normal file 207 # Normal file
207 elif os.path.isfile(file): 208 elif os.path.isfile(file):
208 cmd = "%s %s" % (decompress_cmds[compress_format], file) 209 cmd = "%s %s" % (decompress_cmds[compress_format], file)
209 (retval, output) = oe.utils.getstatusoutput(cmd) 210 (retval, output) = subprocess.getstatusoutput(cmd)
210 if retval: 211 if retval:
211 bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) 212 bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
212 continue 213 continue