haikuporter
haikuporter copied to clipboard
Populate most of `PROVIDES` automatically
Currently PROVIDES
has to be populated by hand. This leads to several problems:
- The recipe would be loaded with
PROVIDES
if the package contains loads ofcmd:
and/orlib:
. This leads to "hacks" such as bash loops (see sys-block/sg3_utils, media-video/ffmpeg). - Typo would lead to a package not installable by
pkgman
(see https://github.com/haikuports/haikuports/issues/2254) - Bumps to library soversion are frequently forgotten (
libVersionCompat
were invented to help with this, but it's not perfect)
With that said, I believe we should implement auto population of app:
, addon:
, cmd:
, devel:
and lib:
entries for HaikuPorter.
The manual population of these variables is also a sanity check. It allows to make sure nothing disappeared from a recipe without anyone noticing (because of a picky configure script which may suddenly decide not to build shared libs anymore, for example).
So I would prefer to keep manual population, but add more checks (policy warnings/errors) to make sure the list is correct.
Haikuporter could also output the correct list of entries when it sees such a problem, to help fixing the recipe.
This forces people to think a little about what they are doing when updating a recipe. By making it all automated, people will just bump versions without checking anything and I bet we would sometimes end up with empty packages because the build failed and haikuporter didn't notice, for example.