aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2016-07-19 15:42:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-21 07:47:53 +0100
commitd183d1e08b819c2d69df85c317c3171a61c8a78d (patch)
tree6c81134ac5065111ea19de641cdd7bfc7f14b190 /meta
parent56aa9c8162952d150bad35fb980767297c0208cb (diff)
downloadopenembedded-core-contrib-d183d1e08b819c2d69df85c317c3171a61c8a78d.tar.gz
package_manager.py: Avoid installing an empty package list
It is possible in an attempt only install, that everything listed is not available to be installed. This will have the effect of clearing the package list. However, we only check for an empty package list at the beginning of the function. We need to also check before running the install, otherwise we can fail due to 'error: no package(s) given". (From OE-Core rev: 9ae6a2830dacb3c335754a6da91bd5cc30546b31) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 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.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 2004a42a01..47f6831f98 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1186,6 +1186,9 @@ class RpmPM(PackageManager):
new_depends[new_depend] = deps[depend]
pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
+ if not pkgs:
+ bb.note("There are no packages to install")
+ return
if not attempt_only:
bb.note('to be installed: %s' % ' '.join(pkgs))
cmd = "%s %s install -y %s" % \