On Mon, Feb 06, 2017 at 06:42:03PM +1300, Chris Lamb wrote:
> Source: git-buildpackage
> Version: 0.8.12.1
> Severity: important
> Tags: patch
> 
> Hi,
> 
> Pretty certain this a regression from #577810 but it is no
> longer possible to import various Debian native packages such
> as apt and git-buildpackage itself:
> 
> $ gbp import-dsc --verbose --download apt
> gbp:warning: Passing --download explicitly is deprecated.
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:info: Downloading 'apt' using 'apt-get'...
> gbp:debug: apt-get ['--download-only', '-qq', 'source', 'apt'] []
> gbp:debug: Debian Native Package
> gbp:debug: Version: 1.4~beta4
> gbp:debug: Debian tarball: /tmp/tmp85CXa3/apt_1.4~beta4.tar.xz
> gbp:info: No git repository found, creating one.
> gbp:debug: ['git', 'init']
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
> gbp:debug: ['git', 'rev-parse', '--git-dir']
> gbp:debug: ['git', 'config', 'user.name', 'Chris Lamb']
> gbp:debug: ['git', 'config', 'user.email', 'la...@debian.org']
> gbp:debug: tar ['-C', 
> '/home/lamby/temp/cdt.20170206182054.hYM5Oha2O3/tmpisHWRy', '-a', '-xf', 
> '/tmp/tmp85CXa3/apt_1.4~beta4.tar.xz'] []
> gbp:debug: ['git', 'tag', '-l', 'debian/1.4_beta4']
> gbp:debug: ['git', 'tag', '-l', 'debian/1.4.beta4']
> gbp:debug: ['git', 'tag', '-l', 'debian/1.4_beta4']
> gbp:debug: ['git', 'tag', '-l', 'debian/1.4.beta4']
> gbp:info: Tag debian/1.4_beta4 not found, importing Debian tarball
> gbp:debug: ['git', 'add', '-f', '.']
> gbp:debug: ['git', 'write-tree']
> gbp:debug: ['git', 'commit-tree', '046e88c2658cb144ce0968b3ebd280c4d3153ed3']
> gbp:debug: ['git', 'update-ref', '-m', 'gbp: Import Debian version 
> 1.4~beta4\n\napt (1.4~beta4) unstable; urgency=med
> <snip very long line here>

Argh...we must not pass that long line to update-ref (as the message for
the reflog) we only want it in the commit message:

---
 gbp/git/repository.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index c9456a71..75f2ebc7 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1530,7 +1530,7 @@ class GitRepository(object):
         if not commit:
             raise GitRepositoryError("Failed to commit tree")
         self.update_ref("refs/heads/%s" % branch, commit, cur,
-                        msg="gbp: %s" % msg)
+                        msg="gbp: %s" % msg.split('\n')[0])
         return commit
 
     def commit_tree(self, tree, msg, parents, author={}, committer={}):

Thanks a lot for reporting this!
Cheers,
 -- Guido

Reply via email to