From 79dd347e9c8c3f65b52979d73715714ec4bbbd57 Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:56:11 +0200 Subject: [PATCH] Remove cleanup function from 10-repos.sh Removed the cleanup function to streamline the script. --- build/10-repos.sh | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/build/10-repos.sh b/build/10-repos.sh index 41446dc..5257de4 100755 --- a/build/10-repos.sh +++ b/build/10-repos.sh @@ -1,37 +1,9 @@ #!/usr/bin/bash set -eoux pipefail -############################################################################### -# cleanup-function (Unverändert, da sehr effektiv für Image-Größe) -############################################################################### -cleanup() { - echo "Starting final cleanup..." - # 1. Ungenutzte Pakete entfernen - dnf5 autoremove -y || true - - # 2. Bereinigung Cache (Das ist das Wichtigste für die Layer-Größe) - dnf5 clean all || true - - # 3. Entfernen von temporären Dateien und Caches - # Wir löschen KEINE Verzeichnisse unter /var/lib/rpm oder /var/lib/dnf, - # sondern nur die temporären Metadaten/Caches. - rm -rf /tmp/* /var/tmp/* /var/cache/dnf/* /var/cache/dnf5/* || true - - # 4. Reinigung der Logs/Run-Verzeichnisse - rm -rf /run/* || true - - echo "Cleanup complete! Image is lean and clean." -} - - -############################################################################### -# Fedora version (used for RPM Fusion) -############################################################################### -FEDORA_VERSION="$(rpm -E %fedora)" - ############################################################################### # Enable RPM Fusion (free + nonfree) ############################################################################### dnf5 install -y \ - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${FEDORA_VERSION}.noarch.rpm \ - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${FEDORA_VERSION}.noarch.rpm + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm