Long inline shell and repeated explanations obscure the job sequence. The engine already has its own selftest. Because one failed issue update must not cancel the others, disable matrix fail-fast. An empty eix result must produce an empty package map. Pin the push action because the dependency-table job grants it write access. Signed-off-by: Zakk <zakk@gentoozh.org>
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# usage: nvchecker-eix.sh
|
|
set -euo pipefail
|
|
|
|
echo "::group::eselect repository add and sync"
|
|
repo_name=$(cat profiles/repo_name)
|
|
eselect repository add "$repo_name" git "file://${PWD}"
|
|
emerge --sync "$repo_name"
|
|
egencache --jobs="$(nproc)" --update --repo "$repo_name" &> /dev/null
|
|
eix-update
|
|
echo "::endgroup::"
|
|
echo "::group::eix search packages"
|
|
pkgs=$(
|
|
# Use availableversions minus live versions because bestversion selects 9999.
|
|
# shellcheck disable=SC2016
|
|
ACCEPT_LICENSE="*" ACCEPT_KEYWORDS="~amd64 ~arm64 ~loong ~riscv" EIX_LIMIT=0 \
|
|
NONLIVE='{first}{!*nv}{}{!plainversion=9999}{!ishardmasked}{isstable}{*nv=<version>}{}{}{}{last}{$nv}<category>/<name>-<$nv>\n{}{}' \
|
|
eix --pure-packages --in-overlay "$repo_name" --format '<availableversions:NONLIVE>' || [ "$?" -eq 1 ]
|
|
)
|
|
if [ -n "$pkgs" ]; then
|
|
mapfile -t atoms <<< "$pkgs"
|
|
pkgs=$(qatom -F "\"%{CATEGORY}/%{PN}\": \"%{PV}\"," "${atoms[@]}")
|
|
fi
|
|
pkgs="{ ${pkgs%,} }"
|
|
echo "$pkgs"
|
|
{
|
|
echo 'pkgs<<EOF'
|
|
echo "$pkgs"
|
|
echo 'EOF'
|
|
} >> "$GITHUB_OUTPUT"
|
|
echo "::endgroup::"
|