[OE-core] [PATCH] lib/oe/package_manager: bail if createrepo can't be found
Ross Burton
ross.burton at intel.com
Thu Dec 15 17:20:55 UTC 2016
If createrepo isn't found then the errors later are mysterious, so explicitly
check and error out early if it isn't there.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oe/package_manager.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index bb45869..e557473 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -164,7 +164,11 @@ class RpmIndexer(Indexer):
archs = archs.union(set(sdk_pkg_archs))
- rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+ rpm_createrepo = bb.utils.which(os.environ['PATH'], "createrepo")
+ if not rpm_createrepo:
+ bb.error("Cannot rebuild index as createrepo was not found in %s" % os.environ['PATH'])
+ return
+
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
else:
--
2.8.1
More information about the Openembedded-core
mailing list