From d784fea1cdf50ca8d80fe2a0074aeb96ab1b580f Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Fri, 12 Mar 2021 13:09:17 -0500 Subject: [PATCH] pbuilder: handle debian change from /updates to -security starting in bullseye, the security suite is -security instead of /updates LP: #1916633 --- pbuilder-dist | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index 9ae4eff..5128ead 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -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))