Package: git-buildpackage
Version: 0.4.27
Severity: normal
Tags: patch
When using --git-export-dir it's useful to be able to inspect the build dir
after the build is complete. Here's a patch to add an option to preserve the
dir, as found in svn-buildpackage.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (900, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages git-buildpackage depends on:
ii devscripts 2.10.27 scripts to make the life of a Debi
ii git-core 1:1.5.5.1-1 fast, scalable, distributed revisi
ii python 2.5.2-1 An interactive high-level object-o
ii python-dateutil 1.4-1 powerful extensions to the standar
ii python-support 0.7.7 automated rebuilding support for P
git-buildpackage recommends no packages.
-- no debconf information
>From d216280c85e8bcf978e0fed3f910cc41941c174e Mon Sep 17 00:00:00 2001
From: Kurt B. Kaiser <[EMAIL PROTECTED]>
Date: Tue, 6 May 2008 13:15:51 -0400
Subject: [PATCH] add --git-dont-purge option
---
docs/manpages/git-buildpackage.sgml | 8 ++++++++
git-buildpackage | 4 +++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/docs/manpages/git-buildpackage.sgml
b/docs/manpages/git-buildpackage.sgml
index 75edcd6..0b1c8ed 100644
--- a/docs/manpages/git-buildpackage.sgml
+++ b/docs/manpages/git-buildpackage.sgml
@@ -35,6 +35,7 @@
<arg><option>--git-export-dir=</option><replaceable>directory</replaceable></arg>
<arg><option>--git-export=</option><replaceable>treeish</replaceable></arg>
<arg><option>--git-pristine-tar</option></arg>
+ <arg><option>--git-dont-purge</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
@@ -204,6 +205,13 @@
<para>use pristine-tar to create the orig.tar.gz</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--git-dont-purge</option>
+ </term>
+ <listitem>
+ <para>retain exported build directory after build</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
diff --git a/git-buildpackage b/git-buildpackage
index 7ff505f..6814d4d 100755
--- a/git-buildpackage
+++ b/git-buildpackage
@@ -171,6 +171,8 @@ def main(argv):
help="Use pristine-tar to create .orig.tar.gz",
action="store_true")
parser.add_option("--git-export", dest="treeish", default=default_tree,
help="export treeish object TREEISH, default is '%s'" %
default_tree)
+ parser.add_option("--git-dont-purge", action="store_true",
dest="no_purge", default=False,
+ help="retain exported build directory after build")
(options, args) = parser.parse_args(args)
if options.verbose:
@@ -276,7 +278,7 @@ def main(argv):
print >>sys.stderr, err
retval = 1
- if options.export_dir and not retval:
+ if options.export_dir and not options.no_purge and not retval:
RemoveTree(export_dir)()
return retval
--
1.5.5.1