aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-03-07 23:13:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-03-07 23:13:23 -0300
commit99fe1826204c2f5bd113228d3ad40e34c46413e2 (patch)
tree28b99a8ae89a488ce3a9fb18f7ed628bb601ecc2 /share/hydractl
parent480b05733ee6ba1f1016296a3060b8259ebeca25 (diff)
downloadhydra-99fe1826204c2f5bd113228d3ad40e34c46413e2.tar.gz
hydra-99fe1826204c2f5bd113228d3ad40e34c46413e2.tar.bz2
Fix: hydractl: dist-upgrade: handles component migration on bookworm
Diffstat (limited to 'share/hydractl')
-rwxr-xr-xshare/hydractl/dist-upgrade7
1 files changed, 7 insertions, 0 deletions
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
}