lib/oe/package_manager: Handle empty package list in opkg case

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).

(From OE-Core rev: b460afb12bb16a4b56d800c953c5f5c7da0bff84)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2015-09-30 14:42:07 +01:00
parent ec504e0ff6
commit c9ea0c619d
1 changed files with 1 additions and 1 deletions

View 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))