From d97b54fc0acc90dc36a7f0f692110e500ca719df Mon Sep 17 00:00:00 2001 From: Siegfried-Angel Gevatter Pujals Date: Tue, 17 Nov 2009 19:50:26 +0100 Subject: [PATCH] * pbuilder-dist, doc/pbuilder-dist.1: - Add "--debug-echo" option which prints the resulting pbuilder/cowbuilder commands instead of executing it. --- debian/changelog | 7 ++++++- doc/pbuilder-dist.1 | 5 +++++ pbuilder-dist | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d645a2..ad96863 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,12 @@ ubuntu-dev-tools (0.83) UNRELEASED; urgency=low [ Kees Cook ] * mk-sbuild-lv: switch to ext4 by default. - -- Kees Cook Tue, 10 Nov 2009 17:16:56 -0800 + [ Siegfried-Angel Gevatter Pujals ] + * pbuilder-dist, doc/pbuilder-dist.1: + - Add "--debug-echo" option which prints the resulting pbuilder/cowbuilder + commands instead of executing it. + + -- Siegfried-Angel Gevatter Pujals Tue, 17 Nov 2009 19:44:44 +0100 ubuntu-dev-tools (0.82) lucid; urgency=low diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index 231b7b4..eb50242 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -58,6 +58,11 @@ For example, if \fBbuild\fP is the option, you will need to also specify a .dsc file. As a special feature, if you specify a .dsc file you can skip the \fBbuild\fP option and this script will automatically assume that building is the action you want to do. +.br +You may also specify \fB--debug-echo\fP so that the \fBpbuilder\fP/ +\fBcowbuilder\fP command which would normally be executed is just printed +on the standard output instead. This is useful for debugging +\fBpbuilder-dist\fP. .SH EXAMPLES .TP diff --git a/pbuilder-dist b/pbuilder-dist index 250d8ab..a9a9cd6 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -333,7 +333,10 @@ def main(): sys.exit(1) # Execute the pbuilder command - sys.exit(os.system(app.get_command(args))) + if not '--debug-echo' in args: + sys.exit(os.system(app.get_command(args))) + else: + print app.get_command(args) if __name__ == '__main__':