summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaul Martins <raulgildons@gmail.com>2018-12-12 05:38:19 -0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-15 17:10:52 +0000
commitf7ef271db58f1a40ea61c76a2811162f2d671051 (patch)
tree4144b73278531da2999ee3d30f826ce351ca5ce6
parent2e8f8d7eb330570a01c77e90540eb5e886243dbc (diff)
downloadpoky-f7ef271db58f1a40ea61c76a2811162f2d671051.tar.gz
oe: Fix opkg status list parse - Missing postinst
While parsing opkg package status, last package status was not properly handled, resulting in final image without postinst and pkg depends (From OE-Core rev: 0d3ca08347eb0c8b9615a0197c213a32f52033c8) Signed-off-by: Raul Martins <raul.martins@alta-rt.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/rootfs.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index e5512d09ef..4273891699 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -519,17 +519,29 @@ class DpkgOpkgRootfs(Rootfs):
519 m_status = re.match("^Status:.*unpacked", line) 519 m_status = re.match("^Status:.*unpacked", line)
520 m_depends = re.match("^Depends: (.*)", line) 520 m_depends = re.match("^Depends: (.*)", line)
521 521
522 #Only one of m_pkg, m_status or m_depends is not None at time
523 #If m_pkg is not None, we started a new package
522 if m_pkg is not None: 524 if m_pkg is not None:
523 if pkg_name and pkg_status_match: 525 #Get Package name
524 pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
525
526 pkg_name = m_pkg.group(1) 526 pkg_name = m_pkg.group(1)
527 #Make sure we reset other variables
527 pkg_status_match = False 528 pkg_status_match = False
528 pkg_depends = "" 529 pkg_depends = ""
529 elif m_status is not None: 530 elif m_status is not None:
531 #New status matched
530 pkg_status_match = True 532 pkg_status_match = True
531 elif m_depends is not None: 533 elif m_depends is not None:
534 #New depends macthed
532 pkg_depends = m_depends.group(1) 535 pkg_depends = m_depends.group(1)
536 else:
537 pass
538
539 #Now check if we can process package depends and postinst
540 if "" != pkg_name and pkg_status_match:
541 pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
542 else:
543 #Not enough information
544 pass
533 545
534 # remove package dependencies not in postinsts 546 # remove package dependencies not in postinsts
535 pkg_names = list(pkgs.keys()) 547 pkg_names = list(pkgs.keys())