diff --git a/actions/upgrades b/actions/upgrades index e2666e9c1..2ca807f76 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -166,7 +166,11 @@ def _check_and_backports_sources(): def _add_apt_preferences(): """Setup APT preferences to upgrade selected packages from backports.""" - preferences_file = '/etc/apt/preferences.d/50freedombox.pref' + old_preferences_file = '/etc/apt/preferences.d/50freedombox.pref' + if os.path.exists(old_preferences_file): + os.remove(old_preferences_file) + + preferences_file = '/etc/apt/preferences.d/50freedombox2.pref' if os.path.exists(preferences_file): print('Preferences up-to-date. Skipping update') return @@ -175,7 +179,7 @@ def _add_apt_preferences(): Explanation: Allow carefully selected updates to 'freedombox' from backports. Package: freedombox Pin: release a=buster-backports -Pin-Priority: 800 +Pin-Priority: 500 ''' print('Updating APT preferences.') diff --git a/debian/postrm b/debian/postrm index b5573a366..98fc69274 100755 --- a/debian/postrm +++ b/debian/postrm @@ -17,6 +17,10 @@ purge) if [ -e '/etc/apt/preferences.d/50freedombox.pref' ]; then rm -f /etc/apt/preferences.d/50freedombox.pref fi + + if [ -e '/etc/apt/preferences.d/50freedombox2.pref' ]; then + rm -f /etc/apt/preferences.d/50freedombox2.pref + fi ;; esac