[build2] Installation Configuration Variables: Absolute Paths, Config Location, Version Tag

Markus Pawellek markus.pawellek at mailbox.org
Tue May 4 14:57:45 UTC 2021

Boris Kolpackov <boris at codesynthesis.com> wrote:

> Markus Pawellek via users <users at build2.org> writes:
> > Again, I agree and please correct me, if I am wrong.
> > But 'config.install.etc' is not a permanent variable 
> > and cannot be set in the configuration file manually.
> Yes, sorry, I was under strong impression we already had
> config.install.etc but apparently we do not!

No problem. I was in doubt myself.
I thought, I may have used a wrong configuration.

> I agree config.install.etc=data_root/etc/ is a good idea and
> I will go ahead and add it.

That is great. Thank you.

> But I still don't think we need config.install.config because
> of the reasons I mentioned in my previous reply. Agree?

I agree.
The main purpose of the request was 'config.install.etc'.

> > Only one question:
> > Is it then still possible to call an installed application?
> > Or do we have to create a symlink to a specific version manually?
> I am not sure I follow what you mean here. We definitely don't
> create any extra symlinks to one of the versions. In other words,
> this behaves exactly as if you hard-coded the version yourself:
> config.install.config = etc/<private>/<project>/1.2.3

Basically, that answer is sufficient.
What I mean:
When installing two versions of the same application 'hello'
what will be the installation path of their binaries?
Maybe the following when using '/usr/local' as prefix?


These locations do not allow to call a default version
of an installed 'hello' binary on the command line.
I thought, the typical process would be to add
a symbolic link to the binary folder to mark the default.
On Linux, small variations of the following three alternatives
seem to be the typical layout for multiple versions.
Please correct me, if I am wrong here.

/usr/local/bin/hello                   -> /usr/local/bin/hello-0.2.0

/usr/local/bin/hello                   -> /usr/local/share/hello/0.2.0/bin/hello

/usr/local/bin/hello-0.1.0             -> /usr/local/share/hello/0.1.0/bin/hello
/usr/local/bin/hello-0.2.0             -> /usr/local/share/hello/0.2.0/bin/hello
/usr/local/bin/hello                   -> /usr/local/bin/hello-0.2.0

My question now is:
Does build2 support such layouts by automatically
creating appropriate symbolic links when installing?

More information about the users mailing list