From 02c531dfb52fb330831924c17da8e6f7fb0caa93 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 18 Jan 2021 22:07:56 +0000 Subject: [PATCH] archive.py: use Regular, Ports, and Internal mirrors by default. Thus enabling pull-lp-debs to work with ports architectures, and inside launchpad builds too. --- debian/changelog | 3 +++ ubuntutools/archive.py | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b769fd6..29cf92d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ ubuntu-dev-tools (0.178) UNRELEASED; urgency=medium * pullpkg.py: fix --mirror option parsing. * config.py: add UBUNTU_INTERNAL_MIRROR option, for launchpad internal mirror. + * archive.py: use Regular, Ports, and Internal mirrors by default. Thus + enabling pull-lp-debs to work with ports architectures, and inside + launchpad builds too. -- Mattia Rizzolo Tue, 22 Dec 2020 17:50:52 +0100 diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index abe6ed4..7d37b34 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -161,8 +161,13 @@ class SourcePackage(object): # Mirrors self.mirrors = list(mirrors) if self.distribution: - self.masters = [UDTConfig.defaults['%s_MIRROR' - % self.distribution.upper()]] + masters = [] + for suffix in ["MIRROR", "PORTS_MIRROR", "INTERNAL_MIRROR"]: + masters.append( + UDTConfig.defaults.get('%s_%s' % + (self.distribution.upper(), + suffix))) + self.masters = filter(None, masters) # if a dsc was specified, pull it to get the source/version info if self._dsc_source: