diff options
author | Ross Burton <ross.burton@intel.com> | 2016-12-15 17:19:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-17 09:57:04 +0000 |
commit | de43650c29db757dbd6c30b484fd2d3d0a49b374 (patch) | |
tree | 32c587526749e6b5a8541d4c707a8d57df4c9e40 /meta | |
parent | 94c469c0d844697b3bd37e22ed3b0b91278b0d23 (diff) | |
download | poky-de43650c29db757dbd6c30b484fd2d3d0a49b374.tar.gz |
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)
(From OE-Core rev: c87361fc886432a9db584712bf3e41ecd0541960)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 6 |
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): | |||
164 | 164 | ||
165 | archs = archs.union(set(sdk_pkg_archs)) | 165 | archs = archs.union(set(sdk_pkg_archs)) |
166 | 166 | ||
167 | rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo") | 167 | rpm_createrepo = bb.utils.which(os.environ['PATH'], "createrepo") |
168 | if not rpm_createrepo: | ||
169 | bb.error("Cannot rebuild index as createrepo was not found in %s" % os.environ['PATH']) | ||
170 | return | ||
171 | |||
168 | if self.d.getVar('PACKAGE_FEED_SIGN') == '1': | 172 | if self.d.getVar('PACKAGE_FEED_SIGN') == '1': |
169 | signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND')) | 173 | signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND')) |
170 | else: | 174 | else: |