Package: dpkg-dev
Version: 1.15.4
Severity: normal
Tags: patch

dpkg-source doesn't work on "3.0 (git)" format source packages if an
extra excludes file is specified in the git config.  It queries the
core.excludesfile git config variable, and if it exists, adds an option
to use that file when running "git ls-files".  However, it uses an
unneeded extra level of quoting, which causes the command to fail.  I
have included below the output from running dpkg-source, and attached a
patch which fixes the problem.

$ dpkg-source -i -I.git -b nuweb-1.0b1
dpkg-source: info: using source format `3.0 (git)'
fatal: cannot use '/home/courtney/.git.d/exclude' as an exclude file
dpkg-source: failure: git ls-files exited nonzero:

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

Kernel: Linux 2.6.28-15-server (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii  binutils                      2.20-1     The GNU assembler, linker and bina
ii  bzip2                         1.0.5-3    high-quality block-sorting file co
ii  dpkg                          1.15.4     Debian package management system
ii  libtimedate-perl              1.1900-1   Time and date functions for Perl
ii  lzma                          4.43-14    Compression method of 7z format in
ii  make                          3.81-6     An utility for Directing compilati
ii  patch                         2.5.9-5    Apply a diff file to an original
ii  perl [perl5]                  5.10.1-5   Larry Wall's Practical Extraction 
ii  perl-modules                  5.10.1-5   Core Perl modules

Versions of packages dpkg-dev recommends:
ii  build-essential           11.4           Informational list of build-essent
pn  fakeroot                  <none>         (no description available)
ii  gcc [c-compiler]          4:4.3.3-9+nmu1 The GNU C compiler
ii  gcc-4.3 [c-compiler]      4.3.4-5        The GNU C compiler
ii  gnupg                     1.4.10-2       GNU privacy guard - a free PGP rep
ii  gpgv                      1.4.10-2       GNU privacy guard - signature veri

Versions of packages dpkg-dev suggests:
pn  debian-keyring                <none>     (no description available)
pn  debian-maintainers            <none>     (no description available)

-- no debconf information
--- a/scripts/Dpkg/Source/Package/V3/git.pm
+++ b/scripts/Dpkg/Source/Package/V3/git.pm
@@ -145,7 +145,7 @@ sub do_build {
     my $core_excludesfile = `git config --get core.excludesfile`;
     chomp $core_excludesfile;
     if (length $core_excludesfile && -e $core_excludesfile) {
-       push @ignores, "--exclude-from='$core_excludesfile'";
+       push @ignores, "--exclude-from=$core_excludesfile";
     }
     if (-e ".git/info/exclude") {
        push @ignores, "--exclude-from=.git/info/exclude";

Reply via email to