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.

This commit is contained in:
Dimitri John Ledkov 2021-01-18 22:07:56 +00:00
parent 5a428b462d
commit 02c531dfb5
No known key found for this signature in database
GPG Key ID: 9B8EC849D5EF70ED
2 changed files with 10 additions and 2 deletions

3
debian/changelog vendored
View File

@ -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 <mattia@debian.org> Tue, 22 Dec 2020 17:50:52 +0100

View File

@ -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: