Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live patch 2 | Prevent installion of conflicting rpi-eeprom package on RPi 4 Bookworm systems #6754

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .update/pre-patches
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ then
fi
# Workaround for Beta v8.23.1 users as previous gpg method installed a 0600 file
[[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC chmod 0644 /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg

# Backport: https://github.com/MichaIng/DietPi/issues/6747
if (( $G_HW_MODEL == 4 && $G_DISTRO > 6 )) && dpkg-query -s rpi-eeprom &> /dev/null
then
G_DIETPI-NOTIFY 2 'Setting rpi-eeprom package on hold to prevent conflicting upgrade attempt'
G_EXEC apt-mark hold rpi-eeprom
fi
fi

exit 0
Expand Down
3 changes: 3 additions & 0 deletions .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ G_OLD_DEBIAN_BRANCH='stretch'
G_LIVE_PATCH_DESC=(
[0]='Fix Sonarr install: https://github.com/MichaIng/DietPi/issues/6699'
[1]='Fix NFS Server install: https://github.com/MichaIng/DietPi/issues/6722'
[2]='Prevent installion of conflicting rpi-eeprom package on RPi 4 Bookworm systems'
)
# shellcheck disable=SC2016
G_LIVE_PATCH_COND=(
[0]='[[ $(mawk '\''NR==9648 && /G_CHECK_URL/'\'' /boot/dietpi/dietpi-software) ]]'
[1]='grep -q '\''dietpi.exports.* G_EXEC .echo'\'' /boot/dietpi/dietpi-software'
[2]='(( $G_HW_MODEL == 4 && $G_DISTRO > 6 )) && ! grep -q '\''https://dietpi.com/downloads/binaries/rpi/rpi-eeprom.deb'\'' /boot/dietpi/func/dietpi-set_hardware'
)
G_LIVE_PATCH=(
[0]='sed -i 9648d /boot/dietpi/dietpi-software'
[1]="sed -i 's/G_EXEC '\''echo/G_EXEC eval '\''echo/' /boot/dietpi/dietpi-software"
[2]="dpkg-query -s rpi-eeprom &> /dev/null && apt-mark hold rpi-eeprom; sed -i 's|G_AG_CHECK_INSTALL_PREREQ rpi-eeprom|G_EXEC_OUTPUT=1 G_EXEC curl -fO https://dietpi.com/downloads/binaries/rpi/rpi-eeprom.deb; G_AGI ./rpi-eeprom.deb; G_EXEC rm rpi-eeprom.deb; G_EXEC apt-mark hold rpi-eeprom|' /boot/dietpi/func/dietpi-set_hardware"
)