mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-21 13:41:20 +02:00
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 <jpiotrowski@microsoft.com>
This commit is contained in:
parent
499fade8d3
commit
3af02e323c
@ -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}
|
||||
)
|
||||
|
@ -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:?}
|
||||
|
Loading…
x
Reference in New Issue
Block a user