]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Apr 2020 22:18:09 +0000 (23:18 +0100)
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>
meta/lib/oe/package_manager.py

index dfe4197ce1fb1efd8353f81f1d3653b5935a643d..072372892732cbc6b0b657e83727d0d3137394a9 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):