mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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. (From OE-Core rev: d8921e4ea68647dfcf02ae046c9e09bf59f3e6e4) (From OE-Core rev: d30920e3e51d731bacb68f50857b55ea0bb512bc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8d0600569b
commit
b6079e0c71
@@ -16,11 +16,14 @@ def create_index(arg):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
bb.note("Executing '%s' ..." % index_cmd)
|
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:
|
except subprocess.CalledProcessError as e:
|
||||||
return("Index creation command '%s' failed with return code %d:\n%s" %
|
return("Index creation command '%s' failed with return code %d:\n%s" %
|
||||||
(e.cmd, e.returncode, e.output))
|
(e.cmd, e.returncode, e.output))
|
||||||
|
|
||||||
|
if result:
|
||||||
|
bb.note(result)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@@ -120,7 +123,10 @@ class RpmIndexer(Indexer):
|
|||||||
bb.note("There are no packages in %s" % self.deploy_dir)
|
bb.note("There are no packages in %s" % self.deploy_dir)
|
||||||
return
|
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):
|
class OpkgIndexer(Indexer):
|
||||||
def write_index(self):
|
def write_index(self):
|
||||||
@@ -156,7 +162,10 @@ class OpkgIndexer(Indexer):
|
|||||||
bb.note("There are no packages in %s!" % self.deploy_dir)
|
bb.note("There are no packages in %s!" % self.deploy_dir)
|
||||||
return
|
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):
|
class DpkgIndexer(Indexer):
|
||||||
@@ -200,7 +209,10 @@ class DpkgIndexer(Indexer):
|
|||||||
bb.note("There are no packages in %s" % self.deploy_dir)
|
bb.note("There are no packages in %s" % self.deploy_dir)
|
||||||
return
|
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):
|
class PkgsList(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user