diff --git a/debian/changelog b/debian/changelog index cca3078..5100de9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ ubuntu-dev-tools (0.153) UNRELEASED; urgency=medium * check-mir: correctly parse dependencies with architecture specifications (LP: #1149679). + [ Benjamin Drung ] + * pbuilder-dist: + - Set different aptcache directories for Debian and Ubuntu. + -- Stefano Rivera Tue, 25 Feb 2014 22:45:05 +0200 ubuntu-dev-tools (0.152+nmu1) unstable; urgency=medium diff --git a/pbuilder-dist b/pbuilder-dist index 7283fb8..b4c861f 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -287,6 +287,8 @@ class PbuilderDist(object): if self.enable_proposed: othermirrors.append('deb %s %s-proposed-updates %s' % (mirror, self.target_distro, components)) + + aptcache = os.path.join(self.base, 'aptcache', 'debian') else: try: dev_release = self.target_distro == UbuntuDistroInfo().devel() @@ -308,6 +310,8 @@ class PbuilderDist(object): othermirrors.append('deb %s %s-proposed %s' % (mirror, self.target_distro, components)) + aptcache = os.path.join(self.base, 'aptcache', 'ubuntu') + if 'OTHERMIRROR' in os.environ: othermirrors += os.environ['OTHERMIRROR'].split('|') @@ -336,7 +340,14 @@ class PbuilderDist(object): '--keyring=/usr/share/keyrings/debian-archive-keyring.gpg', ] - arguments += ['--components', components] + arguments += ['--aptcache', aptcache, '--components', components] + + if not os.path.isdir(aptcache): + try: + os.makedirs(aptcache) + except OSError: + Logger.error('Cannot create aptcache directory "%s"', aptcache) + sys.exit(1) if self.build_architecture != self.system_architecture: arguments += ['--debootstrapopts',