[oe-commits] [openembedded-core] 06/09: package_manager.py: Avoid installing an empty package list

git at git.openembedded.org git at git.openembedded.org
Wed Jul 20 12:43:55 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ce28e1b47c0d6cfb24741832f070e1f11ebf5c8c
Author: Mark Hatle <mark.hatle at windriver.com>
AuthorDate: Tue Jul 19 15:42:32 2016 +0800

    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".
    
    Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
    Signed-off-by: Mingli Yu <mingli.yu at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/package_manager.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 2004a42..47f6831 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" % \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list