All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/oe/package_manager: Handle empty package list in opkg case
@ 2015-09-29 15:32 Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2015-09-29 15:32 UTC (permalink / raw)
  To: openembedded-core

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>

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index c51e88b..630b957 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -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))




^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH] lib/oe/package_manager: Handle empty package list in opkg case
@ 2015-09-30 13:42 Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2015-09-30 13:42 UTC (permalink / raw)
  To: openembedded-core

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>

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index c51e88b..630b957 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -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))




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-30 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 15:32 [PATCH] lib/oe/package_manager: Handle empty package list in opkg case Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2015-09-30 13:42 Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.