From 499fade8d3c3cb9ca9df08bf0ecfaef1df7ac423 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 14 Jan 2022 15:37:39 +0000 Subject: [PATCH] build_torcx_store: store additional 'metaPackage' field in torcx manifest The torcx_manifest.json file currently has a 'sourcePackage' field which is extracted from the first runtime dependency of the torcx package ebuild. This is a convention, and causes sourcePackage to hold 'app-emulation/docker' for the 'app-torcx/docker' package. This does not carry enough information to be able to figure out what other packages are part of the torcx package. Store an additional field, 'metaPackage', in the manifest which contains the name of the torcx package. With the right ebuild it is then possible to figure out what other packages are part of a given torcx package. This can then be used to add that information to the image packages list. Signed-off-by: Jeremi Piotrowski --- build_library/torcx_manifest.sh | 2 ++ build_torcx_store | 1 + 2 files changed, 3 insertions(+) diff --git a/build_library/torcx_manifest.sh b/build_library/torcx_manifest.sh index c1b7439c9c..0a139144d7 100644 --- a/build_library/torcx_manifest.sh +++ b/build_library/torcx_manifest.sh @@ -30,6 +30,7 @@ function torcx_manifest::add_pkg() { pkg_hash="${1}"; shift cas_digest="${1}"; shift source_package="${1}"; shift + meta_package="${1}"; shift update_default="${1}"; shift local manifest=$(cat "${path}") @@ -39,6 +40,7 @@ function torcx_manifest::add_pkg() { "hash": "${pkg_hash}", "casDigest": "${cas_digest}", "sourcePackage": "${source_package}", + "metaPackage": "${meta_package}", "locations": [] } EOF diff --git a/build_torcx_store b/build_torcx_store index f29cbe7969..9d54259d8a 100755 --- a/build_torcx_store +++ b/build_torcx_store @@ -230,6 +230,7 @@ function torcx_package() { "sha512-${sha512sum}" \ "${digest}" \ "${source_pkg}" \ + "${pkg}" \ "${update_default}" \ "${pkg_locations[@]}" )