pbuilder: handle debian change from /updates to -security

starting in bullseye, the security suite is -security instead of /updates

LP: #1916633
This commit is contained in:
Dan Streetman 2021-03-12 13:09:17 -05:00
parent 728849964e
commit d784fea1cd

View File

@ -294,9 +294,14 @@ class PbuilderDist(object):
self.enable_updates = False
if self.enable_security:
othermirrors.append('deb %s %s/updates %s'
pocket = '-security'
with suppress(ValueError):
# before bullseye (version 11) security suite is /updates
if float(debian_info.version(codename)) < 11.0:
pocket = '/updates'
othermirrors.append('deb %s %s%s %s'
% (config.get_value('DEBSEC_MIRROR'),
self.target_distro, components))
self.target_distro, pocket, components))
if self.enable_updates:
othermirrors.append('deb %s %s-updates %s'
% (mirror, self.target_distro, components))