summaryrefslogtreecommitdiffstats
path: root/meta/lib
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/lib
parent56aa9c8162952d150bad35fb980767297c0208cb (diff)
downloadpoky-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/lib')
-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):
1186 new_depends[new_depend] = deps[depend] 1186 new_depends[new_depend] = deps[depend]
1187 pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ') 1187 pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
1188 pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only) 1188 pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
1189 if not pkgs:
1190 bb.note("There are no packages to install")
1191 return
1189 if not attempt_only: 1192 if not attempt_only:
1190 bb.note('to be installed: %s' % ' '.join(pkgs)) 1193 bb.note('to be installed: %s' % ' '.join(pkgs))
1191 cmd = "%s %s install -y %s" % \ 1194 cmd = "%s %s install -y %s" % \