Package: git-buildpackage
Version: 0.5.21
Severity: important
Tags: patch

Hi,

in gbp/git.py, line 539:
            mode, objtype, commit, name = line.split()
fails if the filename contains a whitespace. The proper split would be
            mode, objtype, commit, name = line.split(None, 3)

A patch is attached.

Cheers,

Bernd


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages git-buildpackage depends on:
ii  devscripts                   2.10.71     scripts to make the life of a Debi
ii  git [git-core]               1:1.7.4.1-5 fast, scalable, distributed revisi
ii  git-core                     1:1.7.4.1-5 fast, scalable, distributed revisi
ii  python                       2.6.6-12    interactive high-level object-orie
ii  python-dateutil              1.4.1-3     powerful extensions to the standar
ii  python-support               1.0.11      automated rebuilding support for P

Versions of packages git-buildpackage recommends:
ii  cowbuilder                    0.62+nmu2  pbuilder running on cowdancer
ii  pristine-tar                  1.13       regenerate pristine tarballs

Versions of packages git-buildpackage suggests:
pn  git-load-dirs                 <none>     (no description available)
ii  python-notify                 0.1.1-2+b2 Python bindings for libnotify

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/bin/git-buildpackage (from git-buildpackage package)
debsums: changed file /usr/share/pyshared/gbp/git.py (from git-buildpackage 
package)
>From 5f76ae54b967dc299ac482a7e5097d249258fb30 Mon Sep 17 00:00:00 2001
From: Bernd Zeimetz <b...@debian.org>
Date: Sun, 10 Apr 2011 11:34:04 +0200
Subject: [PATCH] gbp/git.py: Don't split filenames with whitespaces.

---
 gbp/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gbp/git.py b/gbp/git.py
index 96c2255..fb5aa53 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -536,7 +536,7 @@ class GitRepository(object):
 
         out, ret =  self.__git_getoutput('ls-tree', args, cwd=path)
         for line in out:
-            mode, objtype, commit, name = line.split()
+            mode, objtype, commit, name = line.split(None, 3)
             # A submodules is shown as "commit" object in ls-tree:
             if objtype == "commit":
                 nextpath = os.path.sep.join([path, name])
-- 
1.7.4.1

Reply via email to