bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: module libposix


From: Eric Blake
Subject: Re: module libposix
Date: Mon, 20 Sep 2010 09:33:08 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3

On 09/20/2010 09:13 AM, Bruce Korb wrote:
I took a quick look.  The problem is that "git-version-gen" knows
that it must be running in the gnulib root directory.  If it is not,
it just quietly inserts "UNKNOWN" into the output.  This script should
add this code early on:

cd_to_git_root() {
    test -d .git&&  return 0
    d=`dirname $0`/..
    test -d $d/.git&&  cd $d&&  return 0
    d=`git root`
    test -d $d/.git&&  cd $d&&  return 0
   die "cannot determine git version outside of repo"
}

Except that this won't help projects that use git-version-gen inside configure.ac to generate the package version number, where the script MUST succeed (even if by printing UNKNOWN) so that you can autoreconf the project even when outside of a git repository. Furthermore, testing for the existence of .git is not the kosher way of determining whether you are running from within a git repository, and there is no such command as 'git root'.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]