From 99fe1826204c2f5bd113228d3ad40e34c46413e2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 7 Mar 2024 23:13:23 -0300 Subject: Fix: hydractl: dist-upgrade: handles component migration on bookworm --- share/hydractl/dist-upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/hydractl/dist-upgrade b/share/hydractl/dist-upgrade index c59a1ae..b5720e2 100755 --- a/share/hydractl/dist-upgrade +++ b/share/hydractl/dist-upgrade @@ -105,10 +105,12 @@ function hydra_system_upgrade_prepare { echo "Updating apt configuration..." sed -i -e "s/$release/$nextrelease/g" /etc/apt/sources.list + # Update APT Preferences with the next debian release if [ -e "/etc/apt/preferences" ]; then sed -i -e "s/$release/$nextrelease/g" /etc/apt/preferences fi + # Disable backports during the upgrade sed -i -e 's|^deb http://backports.debian.org/debian-backports|#deb http://backports.debian.org/debian-backports|' /etc/apt/sources.list # These will be generated by puppet and can be safely removed @@ -121,6 +123,11 @@ function hydra_system_upgrade_prepare { apt-get remove colord -y fi + # Handles component migration + if [ "$nextrelease" == "bookworm" ]; then + sed -i -e 's|main contrib non-free$|main contrib non-free non-free-firmware|' /etc/apt/sources.list + fi + # Set next state hydra_system_upgrade_stage download } -- cgit v1.2.3