File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ mapfile -t apackages < <(apt-mark showhold)
6464unset -v apackages
6565
6666G_DIETPI-NOTIFY 2 ' Migrating package lists to Bookworm suite'
67+ # Update Microsoft list properly: https://dietpi.com/blog/?p=3128#comment-6199
68+ if dpkg-query -s ' packages-microsoft-prod' 2> /dev/null | grep -q ' ^Status: install ok installed$'
69+ then
70+ G_EXEC curl -sSf ' https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb'
71+ G_EXEC dpkg -i --force-confnew packages-microsoft-prod.deb
72+ G_EXEC rm packages-microsoft-prod.deb
73+ fi
6774G_EXEC sed --follow-symlinks -i ' s/bullseye/bookworm/g' /etc/apt/sources.list
6875(( $G_RASPBIAN )) || G_EXEC sed --follow-symlinks -i -e ' s/ non-free$/ non-free non-free-firmware/' -e ' s/archive.debian.org/deb.debian.org/' /etc/apt/sources.list
6976# Remove obsolete WSDD repo
@@ -81,7 +88,7 @@ G_DIETPI-NOTIFY 2 'Reverting some package lists to Bullseye which have no Bookwo
8188[[ -f ' /etc/apt/sources.list.d/radxa.list' ]] && G_EXEC sed --follow-symlinks -i ' s/bookworm/bullseye/g' /etc/apt/sources.list.d/radxa.list
8289[[ -f ' /etc/apt/sources.list.d/dietpi-radxa.list' ]] && G_EXEC sed --follow-symlinks -i ' s/bookworm/bullseye/g' /etc/apt/sources.list.d/dietpi-radxa.list
8390
84- if dpkg-query -s ' postgresql' & > /dev/null
91+ if dpkg-query -s ' postgresql' 2 > /dev/null | grep -q ' ^Status: install ok installed$ '
8592then
8693 G_DIETPI-NOTIFY 2 ' Preventing automatic v15 main cluster generation'
8794 G_CONFIG_INJECT ' create_main_cluster[[:blank:]]' ' create_main_cluster = false' /etc/postgresql-common/createcluster.conf
Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ mapfile -t apackages < <(apt-mark showhold)
7070unset -v apackages
7171
7272G_DIETPI-NOTIFY 2 ' Migrating package lists to Trixie suite'
73+ # Update Microsoft list properly: https://dietpi.com/blog/?p=3128#comment-6199
74+ if dpkg-query -s ' packages-microsoft-prod' 2> /dev/null | grep -q ' ^Status: install ok installed$'
75+ then
76+ G_EXEC curl -sSf ' https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb'
77+ G_EXEC dpkg -i --force-confnew packages-microsoft-prod.deb
78+ G_EXEC rm packages-microsoft-prod.deb
79+ fi
7380G_EXEC sed --follow-symlinks -i ' s/bookworm/trixie/g' /etc/apt/sources.list
7481# Remove obsolete lists, including those obsoleted with Bookworm
7582G_EXEC rm -f /etc/apt/sources.list.d/dietpi-{mono,wsdd}.list /etc/apt/trusted.gpg.d/dietpi-{mono,wsdd}.gpg
251258fi
252259
253260# PostgreSQL migration
254- if dpkg-query -s ' postgresql' & > /dev/null
261+ if dpkg-query -s ' postgresql' 2 > /dev/null | grep -q ' ^Status: install ok installed$ '
255262then
256263 G_DIETPI-NOTIFY 2 ' Migrating PostgreSQL 15 clusters to v17'
257264 mapfile -t clusters < <( pg_lsclusters | mawk ' $1 == "15" {print $2}' )
You can’t perform that action at this time.
0 commit comments