[build2] Overriding repository location locally

Boris Kolpackov boris at codesynthesis.com
Fri Oct 5 13:32:49 UTC 2018


Per Edin <per.edin at sequence-point.se> writes:

> mkdir -p /tmp/dev
> cd /tmp/dev
> git clone https://github.com/sequence-point/libunittest.git
> git clone https://github.com/sequence-point/libirina.git
> 
> (let's say I've left the office, not having access to the internet anymore)
> 
> cd libunittest
> bdep init -C ../build-clang @clang cc config.cxx=clang++
> 
> cd ../libirina
> bdep init -A ../build-clang @clang
> 
> bdep now tries to download libunittest although it already is available
> locally in ../build-clang.

It doesn't really try to download the libunittest package (though it does
look like it). What it does is get information about available packages
from the libunittest's git repository (build2 can't really know that
this repository only contains the libunittest package which is already
configures). In other words, it will still use your local libunittest.

So the potential solutions are:

1. Do bdep-init immediately after cloning when you still have Internet.
   Once this is done, no further repository fetched will be performed
   (unless your change libirina's repositories.manifest).

2. Temporarily comment out libunittest's repository in libirina's
   repositories.manifest file. This is probably only useful as a once-
   off "hack" (say you are on a plane and there is no other option).

3. We could probably add the ability to remap a repository URL potentially
   to nothing as a way to disable it. The problem is, it will be quite
   tedious to do if you have more than a few repositories.

What do you think, will any of these work for you?



More information about the users mailing list