Expand $releasever/$basearch when checking GPG key paths (only terra gets disabled now)
All checks were successful
Build KAMOS images / Build kamos (push) Successful in 4m58s
Build KAMOS images / Build kamos-nvidia (push) Successful in 3m55s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kmk1971 2026-08-01 16:29:31 +04:00
parent 1f85779d7c
commit 83a118f370

View file

@ -55,10 +55,14 @@ systemctl enable kamos-flatpaks.service
### 6. Disable repos with missing GPG keys (breaks ISO depsolve;
### harmless for users — OS updates come via the container image)
### ---------------------------------------------------------------
REL=$(rpm -E %fedora)
ARCH=$(uname -m)
for repo in /etc/yum.repos.d/*.repo; do
for key in $(grep -oP "(?<=gpgkey=file://)\S+" "$repo" 2>/dev/null || true); do
if [ ! -f "$key" ]; then
echo "Disabling $repo (missing GPG key $key)"
k="${key//\$releasever/$REL}"
k="${k//\$basearch/$ARCH}"
if [ ! -f "$k" ]; then
echo "Disabling $repo (missing GPG key $k)"
sed -i "s/^enabled=1/enabled=0/" "$repo"
break
fi