Expand $releasever/$basearch when checking GPG key paths (only terra gets disabled now)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1f85779d7c
commit
83a118f370
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue