aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-11-21 16:00:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-03 12:22:41 +0000
commitd8921e4ea68647dfcf02ae046c9e09bf59f3e6e4 (patch)
tree05f26b33c1b5a74dc731f6cbaa90a9e1b0114d8b /meta/lib
parentba4dd1afc2476259eff52f8a68fba1344e0f0474 (diff)
downloadopenembedded-core-contrib-d8921e4ea68647dfcf02ae046c9e09bf59f3e6e4.tar.gz
package_manager.py: check the result of create_index
While invoking create_index failed, there was no error output and didn't break the build until the package installation. ... |ERROR: run-postinsts not found in the base feeds (qemux86 i586 x86 noarch any all). ... The reason is we used multiprocessing to execute create_index, and did not check its invoking result. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e18e071106..3c1e74f43d 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -16,11 +16,14 @@ def create_index(arg):
try:
bb.note("Executing '%s' ..." % index_cmd)
- subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
return("Index creation command '%s' failed with return code %d:\n%s" %
(e.cmd, e.returncode, e.output))
+ if result:
+ bb.note(result)
+
return None
@@ -120,7 +123,10 @@ class RpmIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- oe.utils.multiprocess_exec(index_cmds, create_index)
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
+
class OpkgIndexer(Indexer):
def write_index(self):
@@ -156,7 +162,10 @@ class OpkgIndexer(Indexer):
bb.note("There are no packages in %s!" % self.deploy_dir)
return
- oe.utils.multiprocess_exec(index_cmds, create_index)
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
+
class DpkgIndexer(Indexer):
@@ -200,7 +209,10 @@ class DpkgIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- oe.utils.multiprocess_exec(index_cmds, create_index)
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
+
class PkgsList(object):