diff mbox series

[RFC,2/2] classes-global/base: Add manifest to do_unpack

Message ID 20240606140622.2494668-3-JPEWhacker@gmail.com
State New
Headers show
Series Write out file manifest in do_unpack | expand

Commit Message

Joshua Watt June 6, 2024, 2:03 p.m. UTC
Writes a manifest of files unpacked in do_unpack

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/classes-global/base.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index b6940bbb6ff..e543e206d08 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -177,10 +177,12 @@  python base_do_unpack() {
 
     try:
         fetcher = bb.fetch2.Fetch(src_uri, d)
-        fetcher.unpack(d.getVar('UNPACKDIR'))
+        fetcher.unpack(unpackdir)
     except bb.fetch2.BBFetchException as e:
         bb.fatal("Bitbake Fetcher Error: " + repr(e))
 
+    oe.utils.write_file_manifest(unpackdir, workdir + "/unpack-manifest.json", extract_lic=True, ignore_dirs=[".git"])
+
     if basedir and os.path.exists(unpackdir + '/' + basedir):
         # Compatibility magic to ensure ${WORKDIR}/git and ${WORKDIR}/${BP}
         # as often used in S work as expected.