mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-07 05:51:29 +00:00
pbuilder-dist: Support using non-master mirrors. Thanks Mathieu Parent.
(LP: #824285)
This commit is contained in:
parent
9d493af4b0
commit
cdec3f5868
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -8,6 +8,8 @@ ubuntu-dev-tools (0.136) UNRELEASED; urgency=low
|
|||||||
-Allow creating experimental chroots again (LP: #885499)
|
-Allow creating experimental chroots again (LP: #885499)
|
||||||
- experimental shouldn't be the default in experimental chroots.
|
- experimental shouldn't be the default in experimental chroots.
|
||||||
- Add --eatmydata flag (LP: #888440)
|
- Add --eatmydata flag (LP: #888440)
|
||||||
|
* pbuilder-dist: Support using non-master mirrors. Thanks Mathieu Parent.
|
||||||
|
(LP: #824285)
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@debian.org> Sat, 12 Nov 2011 23:28:05 +0200
|
-- Stefano Rivera <stefanor@debian.org> Sat, 12 Nov 2011 23:28:05 +0200
|
||||||
|
|
||||||
|
@ -104,6 +104,15 @@ saved in the results subdirectory of each build environment.
|
|||||||
The default authentication method is \fBsudo\fP. You can change this by
|
The default authentication method is \fBsudo\fP. You can change this by
|
||||||
setting the \fBPBUILDAUTH\fP variable.
|
setting the \fBPBUILDAUTH\fP variable.
|
||||||
.PP
|
.PP
|
||||||
|
By default, \fBpbuilder\-dist\fP use the master Debian and Ubuntu mirrors.
|
||||||
|
The pbuilder \fBMIRRORSITE\fP and \fBOTHERMIRROR\fP variables are
|
||||||
|
supported, as are the standard ubuntu\-dev\-tools variables:
|
||||||
|
\fBUBUNTUTOOLS_DEBIAN_MIRROR\fP, \fBPBUILDER_DIST_DEBIAN_MIRROR\fP,
|
||||||
|
\fBUBUNTUTOOLS_UBUNTU_MIRROR\fP, \fBPBUILDER_DIST_UBUNTU\fP,
|
||||||
|
\fBUBUNTUTOOLS_UBUNTU_PORTS_MIRROR\fP, and
|
||||||
|
\fBPBUILDER_DIST_UBUNTU_PORTS_MIRROR\fP.
|
||||||
|
See \fBubuntu\-dev\-tools\fP (5) for details.
|
||||||
|
.PP
|
||||||
You may also want to know that \fBpbuilder\-dist\fP exports \fBDIST\fP and
|
You may also want to know that \fBpbuilder\-dist\fP exports \fBDIST\fP and
|
||||||
\fBARCH\fP environment variables to the invoked process, containing the name
|
\fBARCH\fP environment variables to the invoked process, containing the name
|
||||||
of the distribution and the architecture targeted by the current build. You
|
of the distribution and the architecture targeted by the current build. You
|
||||||
@ -117,7 +126,10 @@ Please ensure first that the problem is really this script and not an issue
|
|||||||
with \fBpbuilder\fP or \fBcowbuilder\fP themselves.
|
with \fBpbuilder\fP or \fBcowbuilder\fP themselves.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
\fBpbuilder\fR, \fBpbuilderrc\fR, \fBcowbuilder\fR
|
.BR pbuilder (1),
|
||||||
|
.BR pbuilderrc (5),
|
||||||
|
.BR cowbuilder (1),
|
||||||
|
.BR ubuntu\-dev\-tools (5).
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
\fBpbuilder\-dist\fP and this manual page were written by Siegfried-A. Gevatter
|
\fBpbuilder\-dist\fP and this manual page were written by Siegfried-A. Gevatter
|
||||||
|
@ -76,6 +76,12 @@ Should be of the form \fBhttp://archive.ubuntu.com/ubuntu\fR (no
|
|||||||
trailing slash).
|
trailing slash).
|
||||||
If not specified, the master will be used.
|
If not specified, the master will be used.
|
||||||
.TP
|
.TP
|
||||||
|
.B UBUNTUTOOLS_UBUNTU_PORTS_MIRROR
|
||||||
|
The preferred Ubuntu archive mirror.
|
||||||
|
Should be of the form \fBhttp://ports.ubuntu.com\fR (no
|
||||||
|
trailing slash).
|
||||||
|
If not specified, the master will be used.
|
||||||
|
.TP
|
||||||
.B UBUNTUTOOLS_LPINSTANCE
|
.B UBUNTUTOOLS_LPINSTANCE
|
||||||
The launchpad instance to communicate with. e.g. \fBproduction\fR
|
The launchpad instance to communicate with. e.g. \fBproduction\fR
|
||||||
(default) or \fBstaging\fR.
|
(default) or \fBstaging\fR.
|
||||||
|
@ -36,6 +36,7 @@ from devscripts.logger import Logger
|
|||||||
from distro_info import DebianDistroInfo
|
from distro_info import DebianDistroInfo
|
||||||
|
|
||||||
import ubuntutools.misc
|
import ubuntutools.misc
|
||||||
|
from ubuntutools.config import UDTConfig
|
||||||
from ubuntutools import subprocess
|
from ubuntutools import subprocess
|
||||||
|
|
||||||
class PbuilderDist:
|
class PbuilderDist:
|
||||||
@ -232,24 +233,33 @@ class PbuilderDist:
|
|||||||
'deb file:///var/cache/archive/ %s/' % self.target_distro,
|
'deb file:///var/cache/archive/ %s/' % self.target_distro,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
config = UDTConfig()
|
||||||
if self.target_distro in self._debian_distros:
|
if self.target_distro in self._debian_distros:
|
||||||
arguments += ['--mirror', 'http://ftp.debian.org/debian']
|
mirror = os.environ.get('MIRRORSITE',
|
||||||
|
config.get_value('DEBIAN_MIRROR'))
|
||||||
|
arguments += ['--mirror', mirror]
|
||||||
components = 'main'
|
components = 'main'
|
||||||
if self.extra_components:
|
if self.extra_components:
|
||||||
components += ' contrib non-free'
|
components += ' contrib non-free'
|
||||||
else:
|
else:
|
||||||
|
mirror = os.environ.get('MIRRORSITE',
|
||||||
|
config.get_value('UBUNTU_MIRROR'))
|
||||||
|
ports_mirror = os.environ.get('MIRRORSITE',
|
||||||
|
config.get_value('UBUNTU_PORTS_MIRROR'))
|
||||||
if self.build_architecture in ('amd64', 'i386'):
|
if self.build_architecture in ('amd64', 'i386'):
|
||||||
arguments += ['--mirror', 'http://archive.ubuntu.com/ubuntu/']
|
arguments += ['--mirror', mirror]
|
||||||
elif (self.build_architecture == 'powerpc'
|
elif (self.build_architecture == 'powerpc'
|
||||||
and self.target_distro == 'dapper'):
|
and self.target_distro == 'dapper'):
|
||||||
arguments += ['--mirror', 'http://archive.ubuntu.com/ubuntu/']
|
arguments += ['--mirror', mirror]
|
||||||
else:
|
else:
|
||||||
arguments += ['--mirror',
|
arguments += ['--mirror', ports_mirror]
|
||||||
'http://ports.ubuntu.com/ubuntu-ports/']
|
|
||||||
components = 'main restricted'
|
components = 'main restricted'
|
||||||
if self.extra_components:
|
if self.extra_components:
|
||||||
components += ' universe multiverse'
|
components += ' universe multiverse'
|
||||||
|
|
||||||
|
if 'OTHERMIRROR' in os.environ:
|
||||||
|
arguments += ['--othermirror', os.environ['OTHERMIRROR']]
|
||||||
|
|
||||||
# Work around LP:#599695
|
# Work around LP:#599695
|
||||||
if (ubuntutools.misc.system_distribution() == 'Debian'
|
if (ubuntutools.misc.system_distribution() == 'Debian'
|
||||||
and self.target_distro not in self._debian_distros):
|
and self.target_distro not in self._debian_distros):
|
||||||
|
@ -38,6 +38,7 @@ class UDTConfig(object):
|
|||||||
'LPINSTANCE': 'production',
|
'LPINSTANCE': 'production',
|
||||||
'MIRROR_FALLBACK': True,
|
'MIRROR_FALLBACK': True,
|
||||||
'UBUNTU_MIRROR': 'http://archive.ubuntu.com/ubuntu',
|
'UBUNTU_MIRROR': 'http://archive.ubuntu.com/ubuntu',
|
||||||
|
'UBUNTU_PORTS_MIRROR': 'http://ports.ubuntu.com',
|
||||||
'UPDATE_BUILDER': False,
|
'UPDATE_BUILDER': False,
|
||||||
'WORKDIR': None,
|
'WORKDIR': None,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user