summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a8360fe983..3aff9d89c6 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -6,6 +6,7 @@ import shutil
import multiprocessing
import re
import bb
+import tempfile
# this can be used by all PM backends to create the index files in parallel
@@ -411,16 +412,22 @@ class DpkgPkgsList(PkgsList):
output = tmp_output
elif format == "deps":
opkg_query_cmd = bb.utils.which(os.getenv('PATH'), "opkg-query-helper.py")
+ file_out = tempfile.NamedTemporaryFile()
+ file_out.write(output)
+ file_out.flush()
try:
- output = subprocess.check_output("echo -e '%s' | %s" %
- (output, opkg_query_cmd),
+ output = subprocess.check_output("cat %s | %s" %
+ (file_out.name, opkg_query_cmd),
stderr=subprocess.STDOUT,
shell=True)
except subprocess.CalledProcessError as e:
+ file_out.close()
bb.fatal("Cannot compute packages dependencies. Command '%s' "
"returned %d:\n%s" % (e.cmd, e.returncode, e.output))
+ file_out.close()
+
return output