mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
pbuilder-dist: Enable non-release pockets by default (LP: #781003)
This commit is contained in:
parent
1a507e34b0
commit
6f9551f1cb
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -8,8 +8,9 @@ ubuntu-dev-tools (0.135) 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.
|
* pbuilder-dist:
|
||||||
(LP: #824285)
|
- Support using non-master mirrors. Thanks Mathieu Parent. (LP: #824285)
|
||||||
|
- Enable non-release pockets by default (LP: #781003)
|
||||||
* New scripts:
|
* New scripts:
|
||||||
- reverse-depends: Replaces reverse-build-depends. Uses an UbuntuWire
|
- reverse-depends: Replaces reverse-build-depends. Uses an UbuntuWire
|
||||||
webservice for determining all reverse(-build)-dependencies for a
|
webservice for determining all reverse(-build)-dependencies for a
|
||||||
|
@ -37,7 +37,7 @@ Replace this with the codename of the version of Ubuntu or Debian you want to us
|
|||||||
This optional parameter will attempt to construct a chroot in a foreign
|
This optional parameter will attempt to construct a chroot in a foreign
|
||||||
architecture. For some architecture pairs (e.g. i386 on an amd64 install),
|
architecture. For some architecture pairs (e.g. i386 on an amd64 install),
|
||||||
the chroot will be created natively. For others (e.g. armel on an i386
|
the chroot will be created natively. For others (e.g. armel on an i386
|
||||||
install), qemu-static and binfmt-misc will be used. Note that some
|
install), qemu\-static and binfmt\-misc will be used. Note that some
|
||||||
combinations (e.g. amd64 on an i386 install) require special separate
|
combinations (e.g. amd64 on an i386 install) require special separate
|
||||||
kernel handling, and may break in unexpected ways.
|
kernel handling, and may break in unexpected ways.
|
||||||
.TP
|
.TP
|
||||||
@ -58,26 +58,38 @@ building is the action you want to do.
|
|||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
\fB--main-only\fP (deprecated: \fBmainonly\fP)
|
\fB\-\-main\-only\fP (deprecated: \fBmainonly\fP)
|
||||||
If you specify this option, only packages from the \fImain\fP (in Debian) or
|
If you specify this option, only packages from the \fImain\fP (in Debian) or
|
||||||
\fImain\fP and \fIrestricted\fP (in Ubuntu) components will be used. By
|
\fImain\fP and \fIrestricted\fP (in Ubuntu) components will be used. By
|
||||||
default, all official components are enabled. This only has effect when
|
default, all official components are enabled. This only has effect when
|
||||||
creating a new environment.
|
creating a new environment.
|
||||||
.TP
|
.TP
|
||||||
\fB--debug-echo\fP
|
\fB\-\-debug\-echo\fP
|
||||||
The generated \fBpbuilder\fP/\fBcowbuilder\fP command will be printed to the
|
The generated \fBpbuilder\fP/\fBcowbuilder\fP command will be printed to the
|
||||||
standard output instead of being executed. This is useful for debugging.
|
standard output instead of being executed. This is useful for debugging.
|
||||||
.TP
|
.TP
|
||||||
\fB--buildresult\fP \fBDIRECTORY\fP (pbuilder-dist only)
|
\fB\-\-buildresult\fP \fBDIRECTORY\fP (pbuilder\-dist only)
|
||||||
If this option is specified, the resultant files of the \fBpbuilder\fP build
|
If this option is specified, the resultant files of the \fBpbuilder\fP build
|
||||||
are placed in \fBDIRECTORY\fP.
|
are placed in \fBDIRECTORY\fP.
|
||||||
|
.TP
|
||||||
|
\fB\-\-release\-only\fP
|
||||||
|
Only use the release pocket.
|
||||||
|
Default for development releases.
|
||||||
|
.TP
|
||||||
|
\fB\-\-security\-only\fP
|
||||||
|
Only use the release and security pockets.
|
||||||
|
Suitable environment for preparing security updates.
|
||||||
|
.TP
|
||||||
|
\fB\-\-updates\-only\fP
|
||||||
|
Only use the release, security, and updates pocket.
|
||||||
|
Not the proposed\-updates pocket.
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.TP
|
.TP
|
||||||
pbuilder\-dist gutsy create
|
pbuilder\-dist gutsy create
|
||||||
Creates a \fBpbuilder\fP environment for Ubuntu Gutsy, with all components enabled.
|
Creates a \fBpbuilder\fP environment for Ubuntu Gutsy, with all components enabled.
|
||||||
.TP
|
.TP
|
||||||
pbuilder\-sid mainonly create
|
pbuilder\-sid \-\-main\-only create
|
||||||
Creates a \fBpbuilder\fP environment for Debian Sid, with only the main component.
|
Creates a \fBpbuilder\fP environment for Debian Sid, with only the main component.
|
||||||
.TP
|
.TP
|
||||||
pbuilder\-feisty build ./sample_1.0\-0ubuntu1.dsc
|
pbuilder\-feisty build ./sample_1.0\-0ubuntu1.dsc
|
||||||
@ -108,6 +120,7 @@ By default, \fBpbuilder\-dist\fP use the master Debian and Ubuntu mirrors.
|
|||||||
The pbuilder \fBMIRRORSITE\fP and \fBOTHERMIRROR\fP variables are
|
The pbuilder \fBMIRRORSITE\fP and \fBOTHERMIRROR\fP variables are
|
||||||
supported, as are the standard ubuntu\-dev\-tools variables:
|
supported, as are the standard ubuntu\-dev\-tools variables:
|
||||||
\fBUBUNTUTOOLS_DEBIAN_MIRROR\fP, \fBPBUILDER_DIST_DEBIAN_MIRROR\fP,
|
\fBUBUNTUTOOLS_DEBIAN_MIRROR\fP, \fBPBUILDER_DIST_DEBIAN_MIRROR\fP,
|
||||||
|
\fBUBUNTUTOOLS_DEBSEC_MIRROR\fP, \fBPBUILDER_DIST_DEBSEC_MIRROR\fP,
|
||||||
\fBUBUNTUTOOLS_UBUNTU_MIRROR\fP, \fBPBUILDER_DIST_UBUNTU\fP,
|
\fBUBUNTUTOOLS_UBUNTU_MIRROR\fP, \fBPBUILDER_DIST_UBUNTU\fP,
|
||||||
\fBUBUNTUTOOLS_UBUNTU_PORTS_MIRROR\fP, and
|
\fBUBUNTUTOOLS_UBUNTU_PORTS_MIRROR\fP, and
|
||||||
\fBPBUILDER_DIST_UBUNTU_PORTS_MIRROR\fP.
|
\fBPBUILDER_DIST_UBUNTU_PORTS_MIRROR\fP.
|
||||||
@ -120,7 +133,7 @@ can make use of them, for example, in \fBpbuilderrc\fP.
|
|||||||
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
If you experience any problem with this script contact me on rainct@ubuntu.com
|
If you experience any problem with this script contact me on rainct@ubuntu.com
|
||||||
or file a bug at https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools.
|
or file a bug at https://bugs.launchpad.net/ubuntu/+source/ubuntu\-dev\-tools.
|
||||||
.PP
|
.PP
|
||||||
Please ensure first that the problem is really this script and not an issue
|
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.
|
||||||
|
@ -33,7 +33,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from devscripts.logger import Logger
|
from devscripts.logger import Logger
|
||||||
from distro_info import DebianDistroInfo
|
from distro_info import DebianDistroInfo, UbuntuDistroInfo
|
||||||
|
|
||||||
import ubuntutools.misc
|
import ubuntutools.misc
|
||||||
from ubuntutools.config import UDTConfig
|
from ubuntutools.config import UDTConfig
|
||||||
@ -54,6 +54,11 @@ class PbuilderDist:
|
|||||||
# and 'non-free' for Debian.
|
# and 'non-free' for Debian.
|
||||||
self.extra_components = True
|
self.extra_components = True
|
||||||
|
|
||||||
|
# Extra pockets, useful on stable releases
|
||||||
|
self.enable_security = True
|
||||||
|
self.enable_updates = True
|
||||||
|
self.enable_proposed = True
|
||||||
|
|
||||||
# File where the log of the last operation will be saved.
|
# File where the log of the last operation will be saved.
|
||||||
self.logfile = None
|
self.logfile = None
|
||||||
|
|
||||||
@ -240,28 +245,61 @@ class PbuilderDist:
|
|||||||
if self.target_distro in self._debian_distros:
|
if self.target_distro in self._debian_distros:
|
||||||
mirror = os.environ.get('MIRRORSITE',
|
mirror = os.environ.get('MIRRORSITE',
|
||||||
config.get_value('DEBIAN_MIRROR'))
|
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',
|
mirror = os.environ.get('MIRRORSITE',
|
||||||
config.get_value('UBUNTU_MIRROR'))
|
config.get_value('UBUNTU_MIRROR'))
|
||||||
ports_mirror = os.environ.get('MIRRORSITE',
|
if self.build_architecture not in ('amd64', 'i386'):
|
||||||
|
mirror = os.environ.get('MIRRORSITE',
|
||||||
config.get_value('UBUNTU_PORTS_MIRROR'))
|
config.get_value('UBUNTU_PORTS_MIRROR'))
|
||||||
if self.build_architecture in ('amd64', 'i386'):
|
|
||||||
arguments += ['--mirror', mirror]
|
|
||||||
elif (self.build_architecture == 'powerpc'
|
|
||||||
and self.target_distro == 'dapper'):
|
|
||||||
arguments += ['--mirror', mirror]
|
|
||||||
else:
|
|
||||||
arguments += ['--mirror', ports_mirror]
|
|
||||||
components = 'main restricted'
|
components = 'main restricted'
|
||||||
if self.extra_components:
|
if self.extra_components:
|
||||||
components += ' universe multiverse'
|
components += ' universe multiverse'
|
||||||
|
|
||||||
|
arguments += ['--mirror', mirror]
|
||||||
|
|
||||||
|
othermirrors = []
|
||||||
|
if self.target_distro in self._debian_distros:
|
||||||
|
di = DebianDistroInfo()
|
||||||
|
if (di.codename(self.target_distro) or self.target_distro
|
||||||
|
in (di.devel(), 'experimental')):
|
||||||
|
self.enable_security = False
|
||||||
|
self.enable_updates = False
|
||||||
|
self.enable_proposed = False
|
||||||
|
|
||||||
|
if self.enable_security:
|
||||||
|
othermirrors.append('deb %s %s/updates %s'
|
||||||
|
% (config.get_value('DEBSEC_MIRROR'),
|
||||||
|
self.target_distro, components))
|
||||||
|
if self.enable_updates:
|
||||||
|
othermirrors.append('deb %s %s-updates %s'
|
||||||
|
% (mirror, self.target_distro, components))
|
||||||
|
if self.enable_proposed:
|
||||||
|
othermirrors.append('deb %s %s-proposed-updates %s'
|
||||||
|
% (mirror, self.target_distro, components))
|
||||||
|
else:
|
||||||
|
if self.target_distro == UbuntuDistroInfo().devel():
|
||||||
|
self.enable_security = False
|
||||||
|
self.enable_updates = False
|
||||||
|
self.enable_proposed = False
|
||||||
|
|
||||||
|
if self.enable_security:
|
||||||
|
othermirrors.append('deb %s %s-security %s'
|
||||||
|
% (mirror, self.target_distro, components))
|
||||||
|
if self.enable_updates:
|
||||||
|
othermirrors.append('deb %s %s-updates %s'
|
||||||
|
% (mirror, self.target_distro, components))
|
||||||
|
if self.enable_proposed:
|
||||||
|
othermirrors.append('deb %s %s-proposed %s'
|
||||||
|
% (mirror, self.target_distro, components))
|
||||||
|
|
||||||
if 'OTHERMIRROR' in os.environ:
|
if 'OTHERMIRROR' in os.environ:
|
||||||
arguments += ['--othermirror', os.environ['OTHERMIRROR']]
|
othermirrors += os.environ['OTHERMIRROR'].split('|')
|
||||||
|
|
||||||
|
if othermirrors:
|
||||||
|
arguments += ['--othermirror', '|'.join(othermirrors)]
|
||||||
|
|
||||||
# Work around LP:#599695
|
# Work around LP:#599695
|
||||||
if (ubuntutools.misc.system_distribution() == 'Debian'
|
if (ubuntutools.misc.system_distribution() == 'Debian'
|
||||||
@ -381,6 +419,19 @@ def main():
|
|||||||
else:
|
else:
|
||||||
args.remove('--main-only')
|
args.remove('--main-only')
|
||||||
|
|
||||||
|
if '--release-only' in sys.argv:
|
||||||
|
args.remove('--release-only')
|
||||||
|
app.enable_security = False
|
||||||
|
app.enable_updates = False
|
||||||
|
app.enable_proposed = False
|
||||||
|
elif '--security-only' in sys.argv:
|
||||||
|
args.remove('--security-only')
|
||||||
|
app.enable_updates = False
|
||||||
|
app.enable_proposed = False
|
||||||
|
elif '--updates-only' in sys.argv:
|
||||||
|
args.remove('--updates-only')
|
||||||
|
app.enable_proposed = False
|
||||||
|
|
||||||
if len(args) < 1:
|
if len(args) < 1:
|
||||||
Logger.error('Insufficient number of arguments.')
|
Logger.error('Insufficient number of arguments.')
|
||||||
show_help(1)
|
show_help(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user