bug-gnulib
[Top][All Lists]
Advanced

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

Re: issues with git submodules and `bootstrap'


From: Eric Blake
Subject: Re: issues with git submodules and `bootstrap'
Date: Tue, 10 Jan 2012 08:32:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/10/2012 08:20 AM, Werner LEMBERG wrote:
> 
> [gnulib 530dd174]
> 
> 
> The `git submodule' is a very nice feature, however, there are two
> issues.
> 
>   . First of all, there is some user-unfriendliness: Without
>     installing a gnulib submodule for project `foo', just invoking the
>     `bootstrap' script in the `foo' directory' without any arguments
>     gives
> 
>       ./bootstrap: line 610: gnulib/gnulib-tool: No such file or directory
> 
>     This looks like a bug in the script, which it isn't actually.
>     Maybe `bootstrap' can be improved to emit a suggestion how to
>     proceed.

Patches welcome.  It's assumed that a project that uses bootstrap will
already have the submodule set up, so it's only the first developer
actually turning on bootstrap support that will encounter the issue.  So
perhaps it is just a documentation issue on how best to initially set up
the use of the bootstrap script.

> 
>   . Writing
> 
>       git submodule add -- git://git.sv.gnu.org/gnulib.git .gnulib
> 
>     for a project `foo' adds 55MByte.  If I have another project with
>     the same setup, I need 55MByte again.  Not optimal, obviously.
> 
>     How can I save space, for example, by referencing a separately
>     checked out `gnulib' repository as a submodule instead of cloning
>     it?  Of course, the default method of `bootstrap' should be not
>     changed.

export GNULIB_SRCDIR=/path/to/reference

prior to bootstrap, or use

./bootstrap --gnulib-srcdir=/path/to/reference

That shares the .git directory, which is the bulk of the weight; the
remainder of the weight (the actual working directory checkout) has to
be per-project (since not all projects have the same gnulib commit), so
I don't think we can do anything about that, unless we started playing
with sparse checkouts (such as pruning the bulk of gnulib/doc when using
gnulib as a submodule).  Also, the penalty is only in the developer's
machines; running 'make dist' does not put _all_ of gnulib in the
tarball, but just the portions of gnulib that your project actually uses.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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