Bug#482786: git-buildpackage: --git-pristine-tar doesn't work with --git-ignore-new

2008-05-25 Thread Guido Günther
Hi,
On Sat, May 24, 2008 at 08:33:26PM -0700, Russ Allbery wrote:
 When run with --git-ignore-new, git-buildpackage apparently just ignores
 the --git-pristine-tar option or corresponding configuration option.
 One has to use pristine-tar to check out the tarball manually and then
 put it into the tarballs directory.
I can't reproduce this here - and the source code says otherwise too.
Could you provide an example? I did:

$ git-buildpackage --git-ignore-new --git-pristine-tar
pristine-tar: successfully generated ../orig.tar.gz

Cheers,
 -- Guido



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#482786: git-buildpackage: --git-pristine-tar doesn't work with --git-ignore-new

2008-05-25 Thread Russ Allbery
Guido Günther [EMAIL PROTECTED] writes:

 I can't reproduce this here - and the source code says otherwise too.
 Could you provide an example? I did:

 $ git-buildpackage --git-ignore-new --git-pristine-tar
 pristine-tar: successfully generated ../orig.tar.gz

Sure:

windlord:~/dvl/debian/xml-security-c git-buildpackage --git-ignore-new
Exporting 'HEAD' to '/home/eagle/dvl/debian/build-area/xml-security-c-tmp'
Moving '/home/eagle/dvl/debian/build-area/xml-security-c-tmp' to 
'/home/eagle/dvl/debian/build-area/xml-security-c-1.4.0'
Getting orig tarbball from ../tarballs/
Cannot copy orig tarball from ../tarballs/

windlord:~/dvl/debian/xml-security-c git-buildpackage --git-ignore-new 
--git-pristine-tar
Exporting 'HEAD' to '/home/eagle/dvl/debian/build-area/xml-security-c-tmp'
Moving '/home/eagle/dvl/debian/build-area/xml-security-c-tmp' to 
'/home/eagle/dvl/debian/build-area/xml-security-c-1.4.0'
Getting orig tarbball from ../tarballs/
Cannot copy orig tarball from ../tarballs/

windlord:~/dvl/debian/xml-security-c pristine-tar checkout 
xml-security-c_1.4.0.orig.tar.gz
pristine-tar: successfully generated xml-security-c_1.4.0.orig.tar.gz

Here is my gbp.conf, in case that's the source of the problem:

# ~/.gbp.conf -- Configuration for git-buildpackage.
# $Id: gbp.conf 3946 2008-05-06 02:26:19Z eagle $

[DEFAULT]

# Tell git-buildpackage to invoke pbuilder, which requires a wrapper script.
builder = /home/eagle/bin/git-pbuilder

# pdebuild doesn't do make clean.
cleaner = fakeroot debian/rules clean

# Use pristine-tar.
pristine-tar = True

[git-buildpackage]

# Use the svn-buildpackage layout.
export-dir = ../build-area/
tarball-dir = ../tarballs/

[git-import-orig]

# Don't be helpful.
dch = False

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#482786: git-buildpackage: --git-pristine-tar doesn't work with --git-ignore-new

2008-05-25 Thread Guido Guenther
On Sun, May 25, 2008 at 07:52:10AM -0700, Russ Allbery wrote:
 windlord:~/dvl/debian/xml-security-c git-buildpackage --git-ignore-new
 Exporting 'HEAD' to '/home/eagle/dvl/debian/build-area/xml-security-c-tmp'
 Moving '/home/eagle/dvl/debian/build-area/xml-security-c-tmp' to 
 '/home/eagle/dvl/debian/build-area/xml-security-c-1.4.0'
 Getting orig tarbball from ../tarballs/
 Cannot copy orig tarball from ../tarballs/
If you have tarball-dir it _expects_ to find a tarball there. If it
doesn't it fails at the moment. This is no nice behaviour - I changed
the code to try finding/building the upstream tarball harder except when
you really give --no-create-orig. Could you try this patch:

diff --git a/git-buildpackage b/git-buildpackage
index 7b278af..105d46d 100755
--- a/git-buildpackage
+++ b/git-buildpackage
@@ -237,13 +237,13 @@ def main(argv):
 
 # Get/build the orig.tar.gz if necessary:
 if not du.is_native(cp):
-if du.has_orig(cp, output_dir):
-pass
-elif options.tarball_dir: # separate tarball dir specified
-print Getting orig tarbball from %s % tarball_dir
+# first look up if we have a tarball at tarball_dir
+if options.tarball_dir and not du.has_oig(cp, output_dir):
+print Lookig for orig tarball from '%s' % tarball_dir
 if not du.copy_orig(cp, tarball_dir, output_dir):
-raise GbpError, Cannot copy orig tarball from %s % 
tarball_dir
-elif not options.no_create_orig:
+print Orig tarball not found at '%s' % tarball_dir
+# build an orig unless the user forbidds it
+if not options.no_create_orig and not du.has_orig(cp, output_dir):
 if not pristine_tar_build_orig(repo, cp, output_dir, options):
 git_archive_build_orig(repo, cp, output_dir, options)
 
-- 
1.5.5.1

 -- Guido



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#482786: git-buildpackage: --git-pristine-tar doesn't work with --git-ignore-new

2008-05-25 Thread Russ Allbery
Guido Guenther [EMAIL PROTECTED] writes:
 On Sun, May 25, 2008 at 07:52:10AM -0700, Russ Allbery wrote:

 windlord:~/dvl/debian/xml-security-c git-buildpackage --git-ignore-new
 Exporting 'HEAD' to '/home/eagle/dvl/debian/build-area/xml-security-c-tmp'
 Moving '/home/eagle/dvl/debian/build-area/xml-security-c-tmp' to 
 '/home/eagle/dvl/debian/build-area/xml-security-c-1.4.0'
 Getting orig tarbball from ../tarballs/
 Cannot copy orig tarball from ../tarballs/

 If you have tarball-dir it _expects_ to find a tarball there. If it
 doesn't it fails at the moment.

Hm, except it works fine unless --git-ignore-new is given.  I use it with
those settings routinely, and it was only with --git-ignore-new that it
stopped working.

 This is no nice behaviour - I changed the code to try finding/building
 the upstream tarball harder except when you really give
 --no-create-orig. Could you try this patch:

windlord:~/dvl/debian/xml-security-c git-buildpackage --git-ignore-new
Exporting 'HEAD' to '/home/eagle/dvl/debian/build-area/xml-security-c-tmp'
Moving '/home/eagle/dvl/debian/build-area/xml-security-c-tmp' to 
'/home/eagle/dvl/debian/build-area/xml-security-c-1.4.0'
Traceback (most recent call last):
  File /home/eagle/bin/git-buildpackage, line 281, in module
sys.exit(main(sys.argv))
  File /home/eagle/bin/git-buildpackage, line 241, in main
if options.tarball_dir and not du.has_oig(cp, output_dir):
AttributeError: 'module' object has no attribute 'has_oig'

but after fixing the typo, this works great.  Thank you!

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#482786: git-buildpackage: --git-pristine-tar doesn't work with --git-ignore-new

2008-05-24 Thread Russ Allbery
Package: git-buildpackage
Version: 0.4.29
Severity: normal

When run with --git-ignore-new, git-buildpackage apparently just ignores
the --git-pristine-tar option or corresponding configuration option.
One has to use pristine-tar to check out the tarball manually and then
put it into the tarballs directory.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]