mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
upgrades: Fix priority for buster-backports version
If we release version 50 into testing and version 49 into buster-backports and assuming version 45 is in stable, then for stable users, version 49 is selected properly and upgraded due non-availability of 50 for them and high prioritization of buster-backports over buster/stable. This is as expected. For the case of testing user, this does not work as expected, however. buster-backports will be given 800 priority, testing will be given 500 priority (default) and version 49 will be picked instead of the expected 50. Setting priority to 500 fixes the problem. It will equate the buster-backports to all other repositories and will let the system pick the highest version available. Closes: #1498. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
9d44b09fd4
commit
e2f2d337c7
@ -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.')
|
||||
|
||||
4
debian/postrm
vendored
4
debian/postrm
vendored
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user