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.
This commit is contained in:
Krzesimir Nowak 2023-02-23 14:03:21 +01:00
parent 86d7eb5894
commit a5ecf0d79f

View File

@ -77,6 +77,7 @@ create_prod_image() {
local image_initrd_contents="${image_name%.bin}_initrd_contents.txt" local image_initrd_contents="${image_name%.bin}_initrd_contents.txt"
local image_initrd_contents_wtd="${image_name%.bin}_initrd_contents_wtd.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_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}" 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" || die_notrace "coreos-au-key is missing the 'official' use flag"
fi 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 # clean-ups of things we do not need
sudo rm ${root_fs_dir}/etc/csh.env sudo rm ${root_fs_dir}/etc/csh.env
sudo rm -rf ${root_fs_dir}/etc/env.d sudo rm -rf ${root_fs_dir}/etc/env.d