From 98061bc423268449f34d8fc7b4ef0ff2bcc8801e Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Tue, 21 Dec 2010 01:56:28 +0200 Subject: [PATCH] Promote WORKDIR to UBUNTUTOOLS --- doc/backportpackage.1 | 2 +- doc/ubuntu-dev-tools.5 | 16 +++++++++------- ubuntutools/config.py | 5 ++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/backportpackage.1 b/doc/backportpackage.1 index 7b8c42b..3911e91 100644 --- a/doc/backportpackage.1 +++ b/doc/backportpackage.1 @@ -105,7 +105,7 @@ The default value for \fB\-\-builder\fR. .BR BACKPORTPACKAGE_UPDATE_BUILDER ", " UBUNTUTOOLS_UPDATE_BUILDER The default value for \fB--update\fR. .TP -.B BACKPORTPACKAGE_WORKDIR +.BR BACKPORTPACKAGE_WORKDIR ", " UBUNTUTOOLS_WORKDIR The default value for \fB--workdir\fR. .TP .BR BACKPORTPACKAGE_LPINSTANCE ", " UBUNTUTOOLS_LPINSTANCE diff --git a/doc/ubuntu-dev-tools.5 b/doc/ubuntu-dev-tools.5 index 2229e8f..270f76f 100644 --- a/doc/ubuntu-dev-tools.5 +++ b/doc/ubuntu-dev-tools.5 @@ -51,21 +51,23 @@ As in .SH PACKAGE\-WIDE VARIABLES The currently recognised package\-wide variables are: - .TP .B UBUNTUTOOLS_BUILDER This specifies the preferred test\-builder, one of .BR pbuilder " (default), " sbuild ", " pbuilder\-dist . - -.TP -.B UBUNTUTOOLS_UPDATE_BUILDER -Whether or not to update the test\-builder before each test build. -.RB "One of " yes " or " no " (default). - .TP .B UBUNTUTOOLS_LPINSTANCE The launchpad instance to communicate with. e.g. \fBproduction\fR (default) or \fBstaging\fR. +.TP +.B UBUNTUTOOLS_UPDATE_BUILDER +Whether or not to update the test\-builder before each test build. +.RB "One of " yes " or " no " (default). +.TP +.B UBUNTUTOOLS_WORKDIR +The directory to use for preparing source packages etc. +When unset, defaults to a directory in \fI/tmp/\fR named after the +script. .SH SEE ALSO .BR devscripts (1), diff --git a/ubuntutools/config.py b/ubuntutools/config.py index 12bdafa..06a4c36 100644 --- a/ubuntutools/config.py +++ b/ubuntutools/config.py @@ -29,10 +29,13 @@ class UDTConfig(object): environment variable parsing. """ no_conf = False + # Package wide configuration variables. + # These are reqired to be used by at least two scripts. defaults = { 'BUILDER': 'pbuilder', - 'UPDATE_BUILDER': False, 'LPINSTANCE': 'production', + 'UPDATE_BUILDER': False, + 'WORKDIR': None, } # Populated from the configuration files: config = {}