summaryrefslogtreecommitdiff
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-12-15 17:19:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-17 09:56:44 +0000
commitc87361fc886432a9db584712bf3e41ecd0541960 (patch)
tree869085b8e475a1ca5efe013163babc2e0d04b169 /meta/lib/oe
parent147d7802926153ef0abb12d5e738576d8dfd02d7 (diff)
downloadopenembedded-core-c87361fc886432a9db584712bf3e41ecd0541960.tar.gz
openembedded-core-c87361fc886432a9db584712bf3e41ecd0541960.tar.bz2
openembedded-core-c87361fc886432a9db584712bf3e41ecd0541960.zip
lib/oe/package_manager: bail if createrepo can't be found
If createrepo isn't found then the errors later are mysterious, so explicitly check and error out early if it isn't there. (From OE-Core rev: e09636bbb3ea8ec58984197fd9c691bb908efe00) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index bb458691e3..e557473999 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: