From 105db5752b9eb9626de77ae39478bbfc38634efa Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Thu, 17 May 2018 12:20:38 -0400 Subject: [PATCH] pbuilder-dist: pass one --othermirror when local archive found (LP: #1314076) --- pbuilder-dist | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index 6043286..914f7a1 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -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: