He's not dead, he's resting


This is part of a series on EAPI 3.

DEFINED_PHASES and PROPERTIES were retroactively introduced into earlier EAPIs. We could get away with this because it’s legal for a package manager to do absolutely nothing with them and pretend they don’t exist.

PROPERTIES isn’t very interesting; it’s only mandatory in EAPI 3 because we like to tidy things up as we go along. DEFINED_PHASES, however, is now mandatory for a very good reason: it’s necessary to make pkg_pretend usable.

Invoking an ebuild process to run pkg_pretend, even if it does nothing, takes something like a tenth of a second. If you’re doing a world update, that could mean thirty seconds of sitting around waiting, and if you’re doing a full reinstall, several minutes. In the grand scheme of things, it’s not a huge penalty, but it’s one that occurs when the user is sitting waiting rather than something added to build time — and if we add too much to pretend time, users will just stop waiting for it, which defeats the whole point of it. By requiring DEFINED_PHASES support, a package manager only has to pay the penalty for packages where it will be useful.

This one’s more something that would be annoying if it were not there than a revolutionary new feature; users and developers shouldn’t have to care about it, except if they’re interested in the thought and planning that the shadowy cabal directing Gentoo’s future from their secret moon base put into all of this.

DEFINED_PHASES first appeared in exheres-0, where it was always mandatory.


One response to “EAPI 3: DEFINED_PHASES and PROPERTIES Mandatory

  1. Pingback: What’s in EAPI 3? « Ciaran McCreesh’s Blag

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s