summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-02-05 15:25:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:53:44 +0000
commit847591e41a5906eb416ad6376b8d833c90fedf23 (patch)
treed7a2c2eeb310b1d76d0c3d3d71373d7f8be1143c /meta/lib
parentf4fa44cf914dc504709eb8c302566429071f2b80 (diff)
downloadpoky-847591e41a5906eb416ad6376b8d833c90fedf23.tar.gz
lib/oe/package_manager.py: check that package list is not empty
If we're just attempting to install packages and the package list is empty, just return. (From OE-Core rev: 8bf5d80e3502a71fdda688aace0799b47ae19b3b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d3e8a0885b..dfcb0ef783 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -496,7 +496,7 @@ class RpmPM(PackageManager):
496 def install(self, pkgs, attempt_only=False): 496 def install(self, pkgs, attempt_only=False):
497 497
498 bb.note("Installing the following packages: %s" % ' '.join(pkgs)) 498 bb.note("Installing the following packages: %s" % ' '.join(pkgs))
499 if len(pkgs) == 0: 499 if attempt_only and len(pkgs) == 0:
500 return 500 return
501 pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only) 501 pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
502 502
@@ -907,6 +907,9 @@ class OpkgPM(PackageManager):
907 self.deploy_dir_unlock() 907 self.deploy_dir_unlock()
908 908
909 def install(self, pkgs, attempt_only=False): 909 def install(self, pkgs, attempt_only=False):
910 if attempt_only and len(pkgs) == 0:
911 return
912
910 cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs)) 913 cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
911 914
912 os.environ['D'] = self.target_rootfs 915 os.environ['D'] = self.target_rootfs
@@ -1164,6 +1167,9 @@ class DpkgPM(PackageManager):
1164 self.deploy_dir_unlock() 1167 self.deploy_dir_unlock()
1165 1168
1166 def install(self, pkgs, attempt_only=False): 1169 def install(self, pkgs, attempt_only=False):
1170 if attempt_only and len(pkgs) == 0:
1171 return
1172
1167 os.environ['APT_CONFIG'] = self.apt_conf_file 1173 os.environ['APT_CONFIG'] = self.apt_conf_file
1168 1174
1169 cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \ 1175 cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \