]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: Handle empty package list in opkg case
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Sep 2015 13:42:07 +0000 (14:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Oct 2015 06:40:23 +0000 (07:40 +0100)
If you build buildtools-tarball with opkg as the package manager, it
passes in an empty target packages list and fails.

This allows the code to cope with an empty package list (in sync
with the rpm backend).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index c51e88be589ed283c3df1268054b1bf44ae5e391..630b957ba9984ce54dee230f9d008237ec93b063 100644 (file)
@@ -1512,7 +1512,7 @@ class OpkgPM(PackageManager):
         self.deploy_dir_unlock()
 
     def install(self, pkgs, attempt_only=False):
-        if attempt_only and len(pkgs) == 0:
+        if not pkgs:
             return
 
         cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))