[build2] How to tag when having multiple packages in one git repo?

Boris Kolpackov boris at codesynthesis.com
Sat Jul 21 14:53:36 UTC 2018

Klaim - Joël Lamotte <mjklaim at gmail.com> writes:

> What is the recommended way to name tags in case of multi-package
> repository?
> Assuming a (git) repository with several packages, I see several possible
> configurations:
> A. The packages each have different version numbers.
> B. The packages should be considered in the same version number, so it's
>    repository-wide.
> C. The packages each have different version numbers, but the repository
>    also have it's own version number (which is basically how boost works
>    currently).
> I've been searching in the doc about these cases but I don't think
> it's mentioned?

It is mentioned in a note at the beginning of Section 2.6, "Developing
Multiple Packages and Projects":

"A multi-package project works best if all the packages have the same version
and are released together. While the packages themselves can have different
versions (since each has its own manifest), in this scenario following the
release tagging recommendations discussed earlier will be problematic."

So the recommended way is to only use multi-package repositories for
packages that are developed in locksteps (normally a library and an
executable, say libsqlite3 and sqlite3).

> For A, I'm not sure what tag naming would help with build2 automatic
> detection. As I can't name tags "vX.Y.Z" without quickly getting into
> trouble, I was considering doing something like "packagename-vX.Y.Z".

This is incorrect on the conceptual level since you are still tagging
a snapshot of the repository and therefore multiple packages.

If you want to keep unrelated packages in the same repository then you
probably shouldn't be tagging it with package versions (the C approach
mentioned above). There are ideas to allow customizing which tags are
considered for the default set via a configuration file stored in the
"control" branch.


More information about the users mailing list