From a5ecf0d79f1841e17ad511e280ad42ba9450d391 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 23 Feb 2023 14:03:21 +0100 Subject: [PATCH] build_library/prod_image_util.sh: Generate a tarball with portage database Will come in handy when generating OEM sysexts. We can mount the generic image, put the image database back into the image and emerge extra packages without the need to drop all DEPENDS and BDEPENDS from the ebuilds. --- build_library/prod_image_util.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_library/prod_image_util.sh b/build_library/prod_image_util.sh index bc2a39e182..8145712705 100755 --- a/build_library/prod_image_util.sh +++ b/build_library/prod_image_util.sh @@ -77,6 +77,7 @@ create_prod_image() { local image_initrd_contents="${image_name%.bin}_initrd_contents.txt" local image_initrd_contents_wtd="${image_name%.bin}_initrd_contents_wtd.txt" local image_disk_usage="${image_name%.bin}_disk_usage.txt" + local image_pkgdb="${image_name%.bin}_pkgdb.tar.xz" start_image "${image_name}" "${disk_layout}" "${root_fs_dir}" "${update_group}" @@ -100,6 +101,8 @@ create_prod_image() { || die_notrace "coreos-au-key is missing the 'official' use flag" fi + tar -cf "${BUILD_DIR}/${image_pkgdb}" -C "${root_fs_dir}" var/cache/edb var/db/pkg + # clean-ups of things we do not need sudo rm ${root_fs_dir}/etc/csh.env sudo rm -rf ${root_fs_dir}/etc/env.d