From: <Cedric_Hombourger@mentor.com>
To: <isar-users@googlegroups.com>
Cc: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Subject: [PATCH 1/1] image: create an image manifest listing installed packages
Date: Mon, 5 Feb 2018 13:30:41 +0000 [thread overview]
Message-ID: <20180205133041.69108-2-Cedric_Hombourger@mentor.com> (raw)
In-Reply-To: <20180205133041.69108-1-Cedric_Hombourger@mentor.com>
From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Produce an image manifest that lists all packages installed into the
image. Note the architecture, version and (when specified) the source
package. The package details are tab-separated and may easily be
imported into a spreadsheet (e.g. should you need to provide a Bill
Of Material).
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/image.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2c2bafc..c7aa698 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -84,6 +84,16 @@ do_populate() {
addtask populate before do_build after do_unpack
do_populate[deptask] = "do_deploy_deb"
+# Create a manifest of installed packages and their versions
+do_manifest() {
+ install -m 755 -d ${DEPLOY_DIR_IMAGE}
+ sudo chroot ${IMAGE_ROOTFS} dpkg-query \
+ -W -f '${Package}\t${Architecture}\t${Version}\t${Source}\n' \
+ >${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${MACHINE}.manifest
+}
+
+addtask manifest before do_build after do_populate
+
do_copy_boot_files() {
KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')}
if [ -n "${KERNEL_IMAGE}" ]; then
--
2.11.0
next prev parent reply other threads:[~2018-02-05 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 13:30 [PATCH 0/1] Produce an image manifest Cedric_Hombourger
2018-02-05 13:30 ` Cedric_Hombourger [this message]
2018-02-05 13:38 ` [PATCH 1/1] image: create an image manifest listing installed packages Jan Kiszka
2018-02-05 14:37 ` chombourger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180205133041.69108-2-Cedric_Hombourger@mentor.com \
--to=cedric_hombourger@mentor.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox