Implement cleanup function for final cleanup tasks

Added a cleanup function to handle final cleanup tasks instead of directly calling dnf5 clean all.
This commit is contained in:
humocs-man
2026-04-11 13:17:51 +02:00
committed by GitHub
parent 7be7185f2e
commit 744bab1279
+13 -1
View File
@@ -1,6 +1,18 @@
#!/usr/bin/bash #!/usr/bin/bash
set -eoux pipefail set -eoux pipefail
###############################################################################
# cleanup-function
###############################################################################
cleanup() {
echo "Starting final cleanup..."
dnf5 clean all
rm -rf /var/tmp/* /tmp/*
# Falls du im Build-Verzeichnis Dateien erstellst, die nicht ins Image gehören:
# rm -rf /ctx/build/temp_stuff
echo "Cleanup complete! Image is lean and clean."
}
############################################################################### ###############################################################################
# Fedora version (used for RPM Fusion) # Fedora version (used for RPM Fusion)
############################################################################### ###############################################################################
@@ -105,6 +117,6 @@ systemctl enable bootc-fetch-apply-updates.timer
# Cleanup # Cleanup
############################################################################### ###############################################################################
dnf5 clean all cleanup
echo "Custom build complete!" echo "Custom build complete!"