From 6cc80405106787540bea3b051904efd72fe2070b Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 18 Jan 2021 22:06:17 +0000 Subject: [PATCH 1/3] pullpkg.py: fix --mirror option parsing. --- debian/changelog | 3 +++ ubuntutools/pullpkg.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f305820..eb81083 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,9 @@ ubuntu-dev-tools (0.178) UNRELEASED; urgency=medium + Limit bug description length to 50k chars to support Launchpad's limits. LP: #1193941 + [ Dimitri John Ledkov ] + * pullpkg.py: fix --mirror option parsing. + -- Mattia Rizzolo Tue, 22 Dec 2020 17:50:52 +0100 ubuntu-dev-tools (0.177) unstable; urgency=medium diff --git a/ubuntutools/pullpkg.py b/ubuntutools/pullpkg.py index 5e2a22b..5748f04 100644 --- a/ubuntutools/pullpkg.py +++ b/ubuntutools/pullpkg.py @@ -344,7 +344,7 @@ class PullPkg(object): mirrors = [] if options['mirror']: - mirrors.append(options['mirror']) + mirrors.extend(options['mirror']) if pull == PULL_DDEBS: config = UDTConfig(options['no_conf']) ddebs_mirror = config.get_value(distro.upper() + '_DDEBS_MIRROR') From 5a428b462dd5145c308a52a4c923a6b1ff22f37b Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 18 Jan 2021 22:07:01 +0000 Subject: [PATCH 2/3] config.py: add UBUNTU_INTERNAL_MIRROR option, for launchpad internal mirror. --- debian/changelog | 2 ++ ubuntutools/config.py | 1 + 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index eb81083..b769fd6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ ubuntu-dev-tools (0.178) UNRELEASED; urgency=medium [ Dimitri John Ledkov ] * pullpkg.py: fix --mirror option parsing. + * config.py: add UBUNTU_INTERNAL_MIRROR option, for launchpad internal + mirror. -- Mattia Rizzolo Tue, 22 Dec 2020 17:50:52 +0100 diff --git a/ubuntutools/config.py b/ubuntutools/config.py index 5cc14ce..dabfaa2 100644 --- a/ubuntutools/config.py +++ b/ubuntutools/config.py @@ -43,6 +43,7 @@ class UDTConfig(object): 'MIRROR_FALLBACK': True, 'UBUNTU_MIRROR': 'http://archive.ubuntu.com/ubuntu', 'UBUNTU_PORTS_MIRROR': 'http://ports.ubuntu.com', + 'UBUNTU_INTERNAL_MIRROR': 'http://ftpmaster.internal/ubuntu', 'UBUNTU_DDEBS_MIRROR': 'http://ddebs.ubuntu.com', 'UPDATE_BUILDER': False, 'WORKDIR': None, From 02c531dfb52fb330831924c17da8e6f7fb0caa93 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 18 Jan 2021 22:07:56 +0000 Subject: [PATCH 3/3] 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: