From 2978d1f2617a33e2e3a77e249d73e998d79b4ec9 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 26 Nov 2013 12:09:52 +0000 Subject: classes/image: write image manifest Write a list of installed packages to a .manifest file next to the image, so we can find out what went into the image after it has been constructed without necessarily having to have buildhistory enabled (although that will provide more detail.) We can make use of this for example in the testimage class associated code that checks for installed packages for determining whether or not to run specific tests. Note: this replaces the previous ipk-specific manifest code with something that works for ipk, rpm and deb, and instead of a pruned status file, packages are listed one per line, in the following format: Tests for all three backends have shown that the performance impact of this change is negligible (about 1.5s max). Implements [YOCTO #5410] Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/opkg-query-helper.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py index fa6c44fa8b..2fb1a78970 100755 --- a/scripts/opkg-query-helper.py +++ b/scripts/opkg-query-helper.py @@ -28,6 +28,7 @@ import re archmode = False filemode = False +vermode = False args = [] for arg in sys.argv[1:]: @@ -35,6 +36,8 @@ for arg in sys.argv[1:]: archmode = True elif arg == '-f': filemode = True + elif arg == '-v': + vermode = True else: args.append(arg) @@ -60,6 +63,12 @@ for line in fileinput.input(args): elif line.startswith("Architecture:"): arch = line.split(": ")[1] print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch)) + elif vermode: + if line.startswith("Version:"): + ver = line.split(": ")[1] + elif line.startswith("Architecture:"): + arch = line.split(": ")[1] + print("%s %s %s" % (pkg,arch,ver)) else: if line.startswith("Depends:"): depval = line.split(": ")[1] -- cgit 1.2.3-korg