diff --git a/build/10-repos.sh b/build/10-repos.sh index db064fc..900fc18 100755 --- a/build/10-repos.sh +++ b/build/10-repos.sh @@ -21,10 +21,50 @@ dnf5 install -y --nogpgcheck \ # repomd.xml (bekannte Incidents). Ein hickup dort darf weder den Image- # noch den ISO-Build (BIB-Depsolve liest alle aktiven Repos) killen - # der Greeter ist zu dem Zeitpunkt laengst installiert. +# WICHTIG: Pinning pro Section (nicht file-weit) - sonst bleiben z.B. +# debuginfo/source-Sections ungepinnt und koennen shadowen. +python3 - <<'PYEOF' +import glob + +for path in sorted(glob.glob("/etc/yum.repos.d/terra*.repo")): + with open(path) as f: + lines = f.readlines() + out, cur_opts = [], {} + sections = [] # (header_idx, [option lines]) + cur = None + for line in lines: + s = line.strip() + if s.startswith("[") and s.endswith("]"): + if cur is not None: + sections.append(cur) + cur = {"header": line, "opts": []} + elif cur is not None: + cur["opts"].append(line) + else: + out.append(("raw", line)) + continue + if cur is not None: + sections.append(cur) + changed = False + for sec in sections: + has_pin = any(l.split("=")[0].strip() == "includepkgs" for l in sec["opts"] if "=" in l) + has_skip = any(l.split("=")[0].strip() == "skip_if_unavailable" for l in sec["opts"] if "=" in l) + if not has_pin: + sec["opts"].insert(0, "includepkgs=noctalia-greeter*\n") + changed = True + if not has_skip: + sec["opts"].insert(0, "skip_if_unavailable=True\n") + changed = True + with open(path, "w") as f: + for kind, line in out: + f.write(line) + for sec in sections: + f.write(sec["header"]) + f.writelines(sec["opts"]) + print(f"{'angepasst' if changed else 'bereits gepinnt'}: {path}") +PYEOF for repo in /etc/yum.repos.d/terra*.repo; do [[ -e "${repo}" ]] || continue - grep -q '^includepkgs=' "${repo}" || sed -i '/^\[/a includepkgs=noctalia-greeter*' "${repo}" - grep -q '^skip_if_unavailable=' "${repo}" || sed -i '/^\[/a skip_if_unavailable=True' "${repo}" echo "--- ${repo} ---" cat "${repo}" done diff --git a/build/30-virt.sh b/build/30-virt.sh index 62284f0..4e341a9 100755 --- a/build/30-virt.sh +++ b/build/30-virt.sh @@ -24,4 +24,11 @@ dnf5 install -y \ jq \ libnotify +# Fail-fast wie in 40-multimedia.sh: --skip-unavailable duerfte stille +# Luecken reissen (jq/libnotify sind harte Skript-Abhaengigkeiten). +for pkg in distrobox toolbox just micro fuse fuse3 jq libnotify; do + rpm -q "${pkg}" >/dev/null 2>&1 || { echo "FEHLER: ${pkg} fehlt (Repo-Luecke?)"; exit 1; } +done +echo "Virt/Tools-Stack OK" + dnf5 clean all diff --git a/build/40-multimedia.sh b/build/40-multimedia.sh index 4d3527f..f9c12b4 100755 --- a/build/40-multimedia.sh +++ b/build/40-multimedia.sh @@ -30,16 +30,4 @@ for pkg in mesa-va-drivers-freeworld mesa-vdpau-drivers-freeworld \ done echo "Freeworld-Stack OK" -dnf5 clean all - -#echo "Installing rocm" -#dnf5 install -y \ - # rocm-clinfo \ -# rocm-hip \ - # rocm-opencl \ - # rocblas \ - # hipblas \ -# rocm-runtime - - - +dnf5 clean all