mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
pbuilder-dist: Set different aptcache directories for Debian and Ubuntu.
This commit is contained in:
parent
b0209ce796
commit
12ee7e71e3
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -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 <stefanor@debian.org> Tue, 25 Feb 2014 22:45:05 +0200
|
||||
|
||||
ubuntu-dev-tools (0.152+nmu1) unstable; urgency=medium
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user