mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
build_library: Add torcx source packages to the package list
This includes the source package of all torcx packages that are installed on disk, including cases where multiple versions of the same package are available.
This commit is contained in:
parent
83a16990d1
commit
8fde256e45
@ -259,6 +259,11 @@ image_packages() {
|
|||||||
query_available_package "${pkg}"
|
query_available_package "${pkg}"
|
||||||
done < "${profile}/package.provided"
|
done < "${profile}/package.provided"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Include source packages of all torcx images installed on disk.
|
||||||
|
[ -z "${FLAGS_torcx_manifest}" ] ||
|
||||||
|
torcx_manifest::sources_on_disk "${FLAGS_torcx_manifest}" |
|
||||||
|
while read pkg ; do query_available_package "${pkg}" ; done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate a list of installed packages in the format:
|
# Generate a list of installed packages in the format:
|
||||||
|
@ -127,3 +127,9 @@ function torcx_manifest::default_version() {
|
|||||||
local name="${2}"
|
local name="${2}"
|
||||||
jq -r ".value.packages[] | select(.name == \"${name}\").defaultVersion" < "${file}"
|
jq -r ".value.packages[] | select(.name == \"${name}\").defaultVersion" < "${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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}"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user