]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager.py: check that package list is not empty
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Wed, 5 Feb 2014 13:25:18 +0000 (15:25 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2014 11:50:32 +0000 (11:50 +0000)
If we're just attempting to install packages and the package list is
empty, just return.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
meta/lib/oe/package_manager.py

index d3e8a0885b0b7878d70873702e55078aa353794e..dfcb0ef7839177d9ab292c719e79c3fb81d38f6b 100644 (file)
@@ -496,7 +496,7 @@ class RpmPM(PackageManager):
     def install(self, pkgs, attempt_only=False):
 
         bb.note("Installing the following packages: %s" % ' '.join(pkgs))
-        if len(pkgs) == 0:
+        if attempt_only and len(pkgs) == 0:
             return
         pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
 
@@ -907,6 +907,9 @@ class OpkgPM(PackageManager):
         self.deploy_dir_unlock()
 
     def install(self, pkgs, attempt_only=False):
+        if attempt_only and len(pkgs) == 0:
+            return
+
         cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
 
         os.environ['D'] = self.target_rootfs
@@ -1164,6 +1167,9 @@ class DpkgPM(PackageManager):
         self.deploy_dir_unlock()
 
     def install(self, pkgs, attempt_only=False):
+        if attempt_only and len(pkgs) == 0:
+            return
+
         os.environ['APT_CONFIG'] = self.apt_conf_file
 
         cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \