haikuporter icon indicating copy to clipboard operation
haikuporter copied to clipboard

Populate most of `PROVIDES` automatically

Open alaviss opened this issue 6 years ago • 1 comments

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 of cmd: and/or lib:. 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.

alaviss avatar Mar 11 '18 05:03 alaviss

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.

pulkomandy avatar Mar 11 '18 07:03 pulkomandy