Open DimStar77 opened 4 years ago
a
is the package container (the object in the OBS). Inside this container you can have a _multibuild
file that will tell the OBS to look for additional build descriptions to a.spec
.
So in your case it looks for
a.spec
BAR.spec
a-foo.spec
¹When we display this _multibuild
setup we prepend the container name (a:
) to show to which package container this belongs to. BAR.spec
is excluded because the build description is not found.
¹ In the a-foo
case it might be a bit too clever and should actually barf (because there is no a-foo.spec.spec
)...
But if I only have one spec file plus a _multibuild, then it replaces @BUILD_FLAVOR@ inside the .spec file (see installation-images and many others)
News to me :wink: @mlschroe?
As far as I can see, @BUILD_FLAVOR@ is always substituted.
One can either use multple spec files (where the spec file name is the same as the flavor), or one spec file, where the spec file has to match the package/container name.
Two minimal examples for the cases above: https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/multispec https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/singlespec
A combination of both seems to be not possible, it behaves like in the "multiple spec files" case: https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/mixed
The _multibuild file actually has two tags, "flavor" and "package". Maybe meanting of the two needs to be separated. Ie "package" acting like a local link, while "flavor" should use @BUILD_FLAVOR@ to build the same spec several times.
package is just obsolete, flavor is the successor, but package is there for backward compability.
not sure what exactly is open here, but
1) @BUILD_FLAVOR@ is always replaced 2) with a single build description file inside, this one is always used for all flavor builds. 3) if you have multiple build descriptions (a.spec and b.spec) they are used depending on the falvor name. If you have also defined a "c" flavor, but no "c.spec" that one gets no build.
All of that should be documented here: https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.multibuild.html
any open question here?
package is just obsolete, flavor is the successor, but package is there for backward compability.
'obosolete' yet promoted as the way to implement mutibuild in place of package links
Recently, openSUSE:Factory changed the 'policy' to allow multiple spec files AND a _multibuild in one package (as often asked for), so we started testing what we can achieve with that
Somehow, this does not do what I as a user would expect. I have a demo setup at
https://build.opensuse.org/package/show/home:dimstar:Factory/a
There is a.spec, a-foo.spec and a _multibuild
_multbuild contains:
in discussions, it was not clear what the expectation actually should be, but the result in OBS clearly did not match any. OBS builds out of this:
the package a, based on a.spec The package a-foo, based on a-foo.spec
The flavor 'BAR' is added to the scheduler as a:BAR - but excluded
By discussing, we came to the following variants of expectaions what should happen: