Merge branch 'lp1314076' of git+ssh://git.launchpad.net/~freyes/ubuntu-dev-tools

MR: https://code.launchpad.net/~freyes/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/345774
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Mattia Rizzolo 2018-05-18 17:58:34 +02:00
commit a2aacb28ff
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
2 changed files with 8 additions and 8 deletions

4
debian/changelog vendored
View File

@ -1,6 +1,8 @@
ubuntu-dev-tools (0.166) UNRELEASED; urgency=medium
*
[ Felipe Reyes ]
* pbuilder-dist:
+ Fix handling of --othermirror when a local archive found. LP: #1314076
-- Mattia Rizzolo <mattia@debian.org> Fri, 18 May 2018 17:57:21 +0200

View File

@ -249,13 +249,6 @@ class PbuilderDist(object):
if os.path.exists('/var/cache/archive/'):
arguments += ['--bindmounts', '/var/cache/archive/']
localrepo = '/var/cache/archive/' + self.target_distro
if os.path.exists(localrepo):
arguments += [
'--othermirror',
'deb file:///var/cache/archive/ %s/' % self.target_distro,
]
config = UDTConfig()
if self.target_distro in self._debian_distros:
mirror = os.environ.get('MIRRORSITE',
@ -276,6 +269,11 @@ class PbuilderDist(object):
arguments += ['--mirror', mirror]
othermirrors = []
localrepo = '/var/cache/archive/' + self.target_distro
if os.path.exists(localrepo):
repo = 'deb file:///var/cache/archive/ %s/' % self.target_distro
othermirrors.append(repo)
if self.target_distro in self._debian_distros:
debian_info = DebianDistroInfo()
try: