Page MenuHomeFreeBSD

Don't use extension.ini any more, and have each extension install in its file, so the order remains the same.
ClosedPublic

Authored by mat on Jun 29 2016, 11:46 AM.

Details

Summary

For extensions building with USES=php:ext or USES=php:zend, there is now a PHP_MOD_PRIO that is automatically set.

  • If the extension doesn't depend on any other extension, it's set to 20.
  • If the extension needs another extension (USE_PHP is set), it gets 30.

If the extension needs to be loaded before everything (like opcache, or ioncube) it manually gets a lower number, 5 or 10.

If there is an extension that needs an extension that's 30, well the framework can't know that, so, it'll need to to manually get a PHP_MOD_PRIO, of 40 for instance.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mat retitled this revision from to Don't use extension.ini any more, and have each extension install in its file, so the order remains the same..Jun 29 2016, 11:46 AM
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat updated this revision to Diff 18005.
mat edited edge metadata.Jun 29 2016, 11:52 AM
mat updated this revision to Diff 18007.

Install the ext-*-*.ini file in do-install.

mat updated this object.Jun 29 2016, 12:02 PM
mat edited edge metadata.
mat updated this object.
dereckson added inline comments.
Mk/Uses/php.mk
213 ↗(On Diff #18007)

Priorities could offer more flexibility using multiple of 100 instead of 10: divide 100 by four is a no brainer, and doesn't create any stress "hey I'm not going to have a margin available afterwards".

I don't see a real use case requiring so much divides, so it's more a psychological benefit.

mat added inline comments.Jun 29 2016, 12:22 PM
Mk/Uses/php.mk
213 ↗(On Diff #18007)

Thought about it, decided against, there are not a lot of PHP extensions, and in reality, right now, we need 3 or 4 levels (depending on how you read ioncube's doc), in the future, maybe we will need something like 5 or 6 levels, tops.

The most complicated case, right now, is an extension that needs another extension, there are none that go 3 levels.

So, 100 is way too much choice, 1000 would be overboard.

bapt added a reviewer: bapt.Jun 29 2016, 1:02 PM
bapt accepted this revision.
bapt added a subscriber: bapt.

do not forget you will have to bump all related ports

This revision is now accepted and ready to land.Jun 29 2016, 1:02 PM
mat added a comment.Jun 29 2016, 1:08 PM
In D7022#147134, @bapt wrote:

do not forget you will have to bump all related ports

I don't forget, don't worry :-)

mat edited edge metadata.Jun 29 2016, 3:03 PM
mat updated this revision to Diff 18016.

Rebase

This revision now requires review to proceed.Jun 29 2016, 3:03 PM
bapt added a comment.Jul 1 2016, 7:05 AM

This is lacking a documentation to explain the priorities in the top of the php.mk file

mat edited edge metadata.Jul 20 2016, 2:42 PM
mat updated this revision to Diff 18590.
  • Convert two ports that were not even doing it manually.
  • Bump PORTREVISION for all php extensions.
bapt added a comment.Jul 20 2016, 3:24 PM

It still lacks the documentation on top of the php.mk :)

mat updated this revision to Diff 18595.Jul 20 2016, 3:40 PM
  • Add a bit of documentation about PHP_MOD_PRIO.
mat updated this revision to Diff 18806.Jul 27 2016, 2:12 PM

rebase.

This revision was automatically updated to reflect the committed changes.