]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: fix handling of last package
authorJan Luebbe <jlu@pengutronix.de>
Wed, 1 Apr 2020 14:58:02 +0000 (16:58 +0200)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 6 Apr 2020 07:17:05 +0000 (15:17 +0800)
In commit 7d214b34e11dc57316ed5c1c7747c4601286f6d2, only the code in the
for loop was modified to store the pkgarch value. The code used if there
was no empty line at the end was not modified.

Instead of fixing the duplicated code, remove it and just make sure that
a final empty line is processed.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a7b93c695b23d015607b179d98526b9b14c03d45)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/lib/oe/package_manager.py

index 61206daeaa8a608200594d9847097bf096b23fd8..27b2f17f956ea5586616a1244780c7e069c9e568 100644 (file)
@@ -41,7 +41,7 @@ def opkg_query(cmd_output):
     filename = ""
     dep = []
     pkgarch = ""
-    for line in cmd_output.splitlines():
+    for line in cmd_output.splitlines()+['']:
         line = line.rstrip()
         if ':' in line:
             if line.startswith("Package: "):
@@ -80,12 +80,6 @@ def opkg_query(cmd_output):
             dep = []
             pkgarch = ""
 
-    if pkg:
-        if not filename:
-            filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
-        output[pkg] = {"arch":arch, "ver":ver,
-                "filename":filename, "deps": dep }
-
     return output
 
 def failed_postinsts_abort(pkgs, log_path):