Debian Bug report logs - #481806
git-import-orig: Fails pristine-tar when more than one ref matches "upstream"

version graph

Package: git-buildpackage; Maintainer for git-buildpackage is Guido Günther <agx@sigxcpu.org>; Source for git-buildpackage is src:git-buildpackage.

Reported by: Andres Mejia <mcitadel@gmail.com>

Date: Sun, 18 May 2008 05:48:02 UTC

Severity: normal

Fixed in version git-buildpackage/0.4.30

Done: Guido Guenther <agx@sigxcpu.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#481713; Package pristine-tar. Full text and rfc822 format available.

Acknowledgement sent to Andres Mejia <mcitadel@gmail.com>:
New Bug report received and forwarded. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Andres Mejia <mcitadel@gmail.com>
To: submit@bugs.debian.org
Subject: pristine-tar: Fails when more than one ref matches "upstream"
Date: Sun, 18 May 2008 01:45:28 -0400
[Message part 1 (text/plain, inline)]
Package: pristine-tar

Hi,

pristine-tar fails for me with the following message.

pristine-tar: more than one ref matches "upstream":
5f4736c83ea06e9b479a35f25d997b73713306b9 refs/heads/upstream
a8c20d823bc28bb8f6d127e301390bed06e49169 refs/remotes/origin/upstream
/usr/bin/pristine-tar returned 255
Couldn't run '/usr/bin/pristine-tar'

This happened when I tried using the --pristine-tar option in git-import-orig. 
I do track the remote 'upstream' branch, so that git-import-orig will not 
complain about a missing 'upstream' branch.

-- 
Regards,
Andres
[signature.asc (application/pgp-signature, inline)]

Bug 481713 cloned as bug 481806. Request was from Andres Mejia <mcitadel@gmail.com> to control@bugs.debian.org. (Sun, 18 May 2008 17:21:04 GMT) Full text and rfc822 format available.

Bug reassigned from package `pristine-tar' to `git-buildpackage'. Request was from Andres Mejia <mcitadel@gmail.com> to control@bugs.debian.org. (Sun, 18 May 2008 17:21:07 GMT) Full text and rfc822 format available.

Changed Bug title to `git-import-orig: Fails pristine-tar operation when more than one ref' from `pristine-tar: Fails when more than one ref matches "upstream"'. Request was from Andres Mejia <mcitadel@gmail.com> to control@bugs.debian.org. (Sun, 18 May 2008 17:21:08 GMT) Full text and rfc822 format available.

Changed Bug title to `git-import-orig: Fails pristine-tar when more than one ref matches "upstream"' from `git-import-orig: Fails pristine-tar operation when more than one ref'. Request was from Andres Mejia <mcitadel@gmail.com> to control@bugs.debian.org. (Sun, 18 May 2008 17:39:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Andres Mejia <mcitadel@gmail.com>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #18 received at 481806@bugs.debian.org (full text, mbox):

From: Andres Mejia <mcitadel@gmail.com>
To: 481806@bugs.debian.org
Subject: git-import-orig: Fails pristine-tar when more than one ref matches "upstream"
Date: Sun, 18 May 2008 13:48:02 -0400
[Message part 1 (text/plain, inline)]
A further note, this could be a problem with pristine-tar, but I think this 
could be avoided for git-buildpackage if a tag of the upstream branch is done 
first, and then that tag is supplied as the parameter to use as "upstream" 
for pristine-tar.

-- 
Regards,
Andres
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #23 received at 481806@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: Andres Mejia <mcitadel@gmail.com>, 481713@bugs.debian.org
Cc: 481806@bugs.debian.org
Subject: Re: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Sun, 18 May 2008 18:40:38 -0400
[Message part 1 (text/plain, inline)]
Andres Mejia wrote:
> git-import-orig does use what's supplied by the --upstream-branch option or 
> what is found in the gbp.conf files and that is what is passed on to 
> pristine-tar. I suppose this is a problem with git-buildpackage. I've already 
> cloned this bug and assigned it to git-buildpackage. 
> http://bugs.debian.org/481806

Right, it would be good for gbp to pass that info on to pristine-tar.

I don't see anything I can do in pristine-tar to fix this. Ok if I close
#481713?

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Andres Mejia <mcitadel@gmail.com>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #28 received at 481806@bugs.debian.org (full text, mbox):

From: Andres Mejia <mcitadel@gmail.com>
To: 481713@bugs.debian.org
Cc: 481806@bugs.debian.org
Subject: Re: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Sun, 18 May 2008 19:17:18 -0400
[Message part 1 (text/plain, inline)]
On Sunday 18 May 2008 6:40:38 pm Joey Hess wrote:
> Andres Mejia wrote:
> > git-import-orig does use what's supplied by the --upstream-branch option
> > or what is found in the gbp.conf files and that is what is passed on to
> > pristine-tar. I suppose this is a problem with git-buildpackage. I've
> > already cloned this bug and assigned it to git-buildpackage.
> > http://bugs.debian.org/481806
>
> Right, it would be good for gbp to pass that info on to pristine-tar.
>
> I don't see anything I can do in pristine-tar to fix this. Ok if I close
> #481713?

Yes, go ahead and close it.

-- 
Regards,
Andres
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #33 received at 481806@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Andres Mejia <mcitadel@gmail.com>, 481806@bugs.debian.org
Cc: 481713@bugs.debian.org
Subject: Re: Bug#481806: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Mon, 19 May 2008 08:18:24 +0200
On Sun, May 18, 2008 at 07:17:18PM -0400, Andres Mejia wrote:
> On Sunday 18 May 2008 6:40:38 pm Joey Hess wrote:
> > Andres Mejia wrote:
> > > git-import-orig does use what's supplied by the --upstream-branch option
> > > or what is found in the gbp.conf files and that is what is passed on to
> > > pristine-tar. I suppose this is a problem with git-buildpackage. I've
> > > already cloned this bug and assigned it to git-buildpackage.
> > > http://bugs.debian.org/481806
> >
> > Right, it would be good for gbp to pass that info on to pristine-tar.
> >
> > I don't see anything I can do in pristine-tar to fix this. Ok if I close
> > #481713?
What would you expect git-import-orig to do here? Git-import-orig calls
pristine-tar as:
 pristine-tar  commit tarball upstream_upstream_branch_name
Is there anything else git-import-orig could do. Andres, is this 0.4.23
or newer?
Cheers,
 -- Guido




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Andres Mejia <mcitadel@gmail.com>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #38 received at 481806@bugs.debian.org (full text, mbox):

From: Andres Mejia <mcitadel@gmail.com>
To: 481806@bugs.debian.org
Cc: 481713@bugs.debian.org
Subject: Re: Bug#481806: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Mon, 19 May 2008 02:38:50 -0400
[Message part 1 (text/plain, inline)]
On Monday 19 May 2008 2:18:24 am Guido Günther wrote:
> On Sun, May 18, 2008 at 07:17:18PM -0400, Andres Mejia wrote:
> > On Sunday 18 May 2008 6:40:38 pm Joey Hess wrote:
> > > Andres Mejia wrote:
> > > > git-import-orig does use what's supplied by the --upstream-branch
> > > > option or what is found in the gbp.conf files and that is what is
> > > > passed on to pristine-tar. I suppose this is a problem with
> > > > git-buildpackage. I've already cloned this bug and assigned it to
> > > > git-buildpackage. http://bugs.debian.org/481806
> > >
> > > Right, it would be good for gbp to pass that info on to pristine-tar.
> > >
> > > I don't see anything I can do in pristine-tar to fix this. Ok if I
> > > close #481713?
>
> What would you expect git-import-orig to do here? Git-import-orig calls
> pristine-tar as:
>  pristine-tar  commit tarball upstream_upstream_branch_name
> Is there anything else git-import-orig could do. Andres, is this 0.4.23
> or newer?
> Cheers,
>  -- Guido

This is 0.4.28. git-import-orig could call pristine tar as:
  pristine-tar commit <path_to_tarball> <tag_object>

I think it would be better if it called the tag object instead of the upstream 
branch name, since in the latter case, it will always fail since it's finding 
a local upstream branch (refs/heads/upstream) and a remote upstream branch 
(refs/remotes/origin/upstream).

-- 
Regards,
Andres
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #43 received at 481806@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Andres Mejia <mcitadel@gmail.com>, 481806@bugs.debian.org
Cc: 481713@bugs.debian.org
Subject: Re: Bug#481806: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Mon, 19 May 2008 09:08:32 +0200
On Mon, May 19, 2008 at 02:38:50AM -0400, Andres Mejia wrote:
> I think it would be better if it called the tag object instead of the upstream 
> branch name, since in the latter case, it will always fail since it's finding 
> a local upstream branch (refs/heads/upstream) and a remote upstream branch 
> (refs/remotes/origin/upstream).
Since the branch passed to git-import-orig needs to be a local branch
anyway we can simply prefix with 'refs/heads' to make pristine-tar
happy.
 -- Guido




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Andres Mejia <mcitadel@gmail.com>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #48 received at 481806@bugs.debian.org (full text, mbox):

From: Andres Mejia <mcitadel@gmail.com>
To: 481806@bugs.debian.org
Cc: 481713@bugs.debian.org
Subject: Re: Bug#481806: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Mon, 19 May 2008 03:14:58 -0400
[Message part 1 (text/plain, inline)]
On Monday 19 May 2008 3:08:32 am Guido Günther wrote:
> On Mon, May 19, 2008 at 02:38:50AM -0400, Andres Mejia wrote:
> > I think it would be better if it called the tag object instead of the
> > upstream branch name, since in the latter case, it will always fail since
> > it's finding a local upstream branch (refs/heads/upstream) and a remote
> > upstream branch (refs/remotes/origin/upstream).
>
> Since the branch passed to git-import-orig needs to be a local branch
> anyway we can simply prefix with 'refs/heads' to make pristine-tar
> happy.
>  -- Guido

That should work too.

-- 
Regards,
Andres
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Guenther <agx@sigxcpu.org>:
Bug#481806; Package git-buildpackage. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to Guido Guenther <agx@sigxcpu.org>. Full text and rfc822 format available.

Message #53 received at 481806@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Andres Mejia <mcitadel@gmail.com>, 481806@bugs.debian.org
Cc: 481713@bugs.debian.org
Subject: Re: Bug#481806: Bug#481713: pristine-tar: Fails when more than one ref matches "upstream"
Date: Mon, 19 May 2008 12:36:16 +0200
Hi Andres,
On Mon, May 19, 2008 at 03:14:58AM -0400, Andres Mejia wrote:
> On Monday 19 May 2008 3:08:32 am Guido Günther wrote:
> > On Mon, May 19, 2008 at 02:38:50AM -0400, Andres Mejia wrote:
> > > I think it would be better if it called the tag object instead of the
> > > upstream branch name, since in the latter case, it will always fail since
> > > it's finding a local upstream branch (refs/heads/upstream) and a remote
> > > upstream branch (refs/remotes/origin/upstream).
> >
> > Since the branch passed to git-import-orig needs to be a local branch
> > anyway we can simply prefix with 'refs/heads' to make pristine-tar
> > happy.
> >  -- Guido
> 
> That should work too.
Could you check if this patch helps:

diff --git a/git-import-dsc b/git-import-dsc
index c8e34a5..aece7f9 100755
--- a/git-import-dsc
+++ b/git-import-dsc
@@ -47,7 +47,7 @@ def import_initial(src, dirs, options):
             gbpc.GitBranch()(options.upstream_branch)
             if options.pristine_tar:
                 gbpc.PristineTar().commit(os.path.join(dirs['top'], src.tgz),
-                                          options.upstream_branch)
+                                          'refs/heads/%s' % options.upstream_branch)
     except gbpc.CommandExecFailed:
         print >>sys.stderr, "Creation of git repository failed"
         return False
diff --git a/git-import-orig b/git-import-orig
index 17744f2..e540880 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -203,7 +203,7 @@ on howto create it otherwise use --upstream-branch to specify it.
             if options.pristine_tar:
                 upstream_branch = [ options.upstream_branch, 'master' ][is_empty]
                 if pristine_orig:
-                    gbpc.PristineTar().commit(pristine_orig, upstream_branch)
+                    gbpc.PristineTar().commit(pristine_orig, 'refs/heads/%s' % upstream_branch)
                 else:
                     print >>sys.stderr, "Warning: '%s' not an archive, skipping pristine-tar" % archive
             gbpc.GitTag(options.sign_tags, options.keyid)(build_tag(options.upstream_tag, version),

Cheers,
 -- Guido




Reply sent to Guido Guenther <agx@sigxcpu.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Andres Mejia <mcitadel@gmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #58 received at 481806-close@bugs.debian.org (full text, mbox):

From: Guido Guenther <agx@sigxcpu.org>
To: 481806-close@bugs.debian.org
Subject: Bug#481806: fixed in git-buildpackage 0.4.30
Date: Thu, 29 May 2008 15:32:04 +0000
Source: git-buildpackage
Source-Version: 0.4.30

We believe that the bug you reported is fixed in the latest version of
git-buildpackage, which is due to be installed in the Debian FTP archive:

git-buildpackage_0.4.30.dsc
  to pool/main/g/git-buildpackage/git-buildpackage_0.4.30.dsc
git-buildpackage_0.4.30.tar.gz
  to pool/main/g/git-buildpackage/git-buildpackage_0.4.30.tar.gz
git-buildpackage_0.4.30_all.deb
  to pool/main/g/git-buildpackage/git-buildpackage_0.4.30_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 481806@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Guenther <agx@sigxcpu.org> (supplier of updated git-buildpackage package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 29 May 2008 13:24:51 +0200
Source: git-buildpackage
Binary: git-buildpackage
Architecture: source all
Version: 0.4.30
Distribution: unstable
Urgency: low
Maintainer: Guido Guenther <agx@sigxcpu.org>
Changed-By: Guido Guenther <agx@sigxcpu.org>
Description: 
 git-buildpackage - Suite to help with Debian packages in Git repositories
Closes: 481806 482786
Changes: 
 git-buildpackage (0.4.30) unstable; urgency=low
 .
   * [cc9c42a] Try harder to find/build the upstream tarball (Closes:
     #482786)
   * [e6dd31e] Help pristine-tar to find the branch name (Closes:
     #481806)
Checksums-Sha1: 
 52e5b89cbfc91450b84f10c64e73df6edeb92cf9 971 git-buildpackage_0.4.30.dsc
 97c68e0317bb0f2807df382ad6fc0371b4097335 40283 git-buildpackage_0.4.30.tar.gz
 398918c050fb37cb08b948ebbe2840a4544b14d3 55116 git-buildpackage_0.4.30_all.deb
Checksums-Sha256: 
 4274d6eed97a9fd6b5a7f56d993a6f0fa9872c348cf74fd0239d08ff8ae682cd 971 git-buildpackage_0.4.30.dsc
 5b5ba790fad684b13a9dff062345996f5bb8dce1b9ead0f664ad516725d6192c 40283 git-buildpackage_0.4.30.tar.gz
 bfe0782c5247dfd3efa44f0405bcc5ea56aa3239e757b361e4e2c9a748489608 55116 git-buildpackage_0.4.30_all.deb
Files: 
 beb3ae60f68b29295d0fb59dcfb6d094 971 devel optional git-buildpackage_0.4.30.dsc
 a9b6e3e6926912231686481e5055df2d 40283 devel optional git-buildpackage_0.4.30.tar.gz
 101c0e6bb89ea6eecefcfe477e598071 55116 devel optional git-buildpackage_0.4.30_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIPpaNn88szT8+ZCYRAv55AJ0Ry0bbqzJX0O41QopzSTVyXgsvaQCdH0CG
4BEMEnkI3EWQ8ghCjfQ6bYY=
=hjiw
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 08 Jul 2008 07:26:55 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 07:55:07 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.