Package: git-buildpackage
Version: 0.4.20~bpo40+1
Severity: wishlist

When importing internal packages into git I occasionally ran into
failures like the following:

$ git-import-dsc foobar_0.0.20040915-14.dsc
Upstream version: 0.0.20040915
Debian version: 14
No git repository found, creating one.
Initialized empty Git repository in .git/
fatal: pathspec '' did not match any files
git returned 128
Couldn't add files
Creation of git repository failed
$

Three hours of debugging later I finally found the reason in an empty
"upstream" tarball like

-rw-r--r-- 1 cbiedl cbiedl    137 Oct 26  2004 foobar_0.0.20041026.orig.tar.gz

git-import-dsc will unpack this ball and run "git init-db" and "git
add ." in the temporary directory.  The latter fails since git cannot
handle an empty directory.

While this is probably not the best style of package development,
git-import-dsc should still catch this situation. So _if_ the
temporary directory is empty after unpacking, git-import-dsc could
either
* call git-add in a better way (if possible, I still don't know enough
  about git's possibilities), or
* create a placeholder file to make git-add happy (and tell the user
  about it), for safety reasons this would happen only after an
  according option was given, or
* abort with a helpful error message.

Personally I'd prefer the second solution.  For the time being I have
to patch the placeholder into the tarball and update .dsc.  This is
rather painful.

If you think the whole situation does not deserve that attention, please
document that behaviour in the manpage so other people will save the
time I lost when tracking down the problem.

    Christoph

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.25-rc8
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages git-buildpackage depends on:
ii  devscripts           2.9.25              Scripts to make the life of a Debi
ii  git-core             1:1.5.4.4-1~bpo40+1 fast, scalable, distributed revisi
ii  python               2.4.4-2             An interactive high-level object-o
ii  python-support       0.5.6               automated rebuilding support for p

git-buildpackage recommends no packages.

-- no debconf information

Attachment: signature.asc
Description: Digital signature

Reply via email to