From 3af02e323ca0d433256d5d9824855a203bee1b1a Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 14 Jan 2022 15:49:02 +0000 Subject: [PATCH] build_library/torcx_manifest.sh: list all component pkgs in sources_on_disk() source_on_disk() so far relied on the 'sourcePackage' field, which contains the primary dependency of a torcx packge (app-torcx/docker -> app-emulation/docker). Now the 'metaPackage' field (app-torcx/docker) is used, which lets us look at RDEPENDS and figure out all packages that are indirectly installed when installing a torcx package. torcx_dependencies() does just that, so move it's definition to torcx_manifest.sh. Signed-off-by: Jeremi Piotrowski --- build_library/torcx_manifest.sh | 15 ++++++++++++++- build_torcx_store | 9 --------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/build_library/torcx_manifest.sh b/build_library/torcx_manifest.sh index 0a139144d7..c44402279c 100644 --- a/build_library/torcx_manifest.sh +++ b/build_library/torcx_manifest.sh @@ -133,5 +133,18 @@ function torcx_manifest::default_version() { # sources_on_disk returns the list of source packages of all torcx images installed on disk function torcx_manifest::sources_on_disk() { local file="${1}" - jq -r ".value.packages[].versions[] | select(.locations[].path).sourcePackage" < "${file}" + local torcx_pkg="" + jq -r ".value.packages[].versions[] | select(.locations[].path).metaPackage" < "${file}" | + while read torcx_pkg; do + torcx_dependencies "${torcx_pkg}" | tr ' ' '\n' + done } + +# Print the first level of runtime dependencies for a torcx meta-package. +function torcx_dependencies() ( + pkg=${1:?} + ebuild=$(equery-${BOARD} w "${pkg}") + function inherit() { : ; } + . "${ebuild}" + echo ${RDEPEND} +) diff --git a/build_torcx_store b/build_torcx_store index 9d54259d8a..c4b0f99ff9 100755 --- a/build_torcx_store +++ b/build_torcx_store @@ -58,15 +58,6 @@ check_gsutil_opts TORCX_CAS_ROOT="${FLAGS_output_root}/pkgs/${BOARD}" -# Print the first level of runtime dependencies for a torcx meta-package. -function torcx_dependencies() ( - pkg=${1:?} - ebuild=$(equery-${BOARD} w "${pkg}") - function inherit() { : ; } - . "${ebuild}" - echo ${RDEPEND} -) - # Build and install a package configured as part of a torcx image. function torcx_build() ( tmproot=${1:?}