{"id":364,"date":"2015-11-13T22:13:51","date_gmt":"2015-11-13T21:13:51","guid":{"rendered":"https:\/\/blogs.gentoo.org\/mgorny\/?p=364"},"modified":"2015-11-18T17:07:03","modified_gmt":"2015-11-18T16:07:03","slug":"the-ultimate-guide-to-eapi-6","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/mgorny\/2015\/11\/13\/the-ultimate-guide-to-eapi-6\/","title":{"rendered":"The Ultimate Guide to EAPI\u00a06"},"content":{"rendered":"<p>Now that EAPI\u00a06 is Council-approved and\u00a0pretty close to being deployed, I think it&#8217;s about time to write up a\u00a0not-so-short guide to it. It&#8217;s especially important that EAPI\u00a06 is a\u00a0bit different from the\u00a0previous EAPIs. It was not only seen as an\u00a0opportunity to add new features but also to tidy things up a\u00a0bit and\u00a0improve strictness.<\/p>\n<p>If you look into the\u00a0PMS, you&#8217;d see that we&#8217;d not only added completely new stuff but also ported a\u00a0few common eclass functions, in a\u00a0little cleaner form, and\u00a0new useful phase functions. Furthermore, we used EAPI\u00a06 as an\u00a0opportunity to finally increase strictness of\u00a0Portage in\u00a0regard to\u00a0PMS, and\u00a0ban some long-unwanted eclasses.<\/p>\n<p>Therefore, I&#8217;d like to ask you \u2014 please don&#8217;t go hooray-enabling EAPI\u00a06 support in\u00a0your ebuilds and\u00a0eclasses. Take a\u00a0while to think, and\u00a0do things right. Please think of EAPI\u00a06 as a\u00a0lifetime opportunity of\u00a0improving your eclass APIs, as we improved the\u00a0API provided by\u00a0Package Managers.<\/p>\n<p>Now, time for a\u00a0little summary of\u00a0changes, their implications and\u00a0a\u00a0bit of\u00a0rationale.<\/p>\n<p><!--more--><\/p>\n<h2>Bash upgrade and\u00a0compatibility setting<\/h2>\n<p>The\u00a0first important change in\u00a0EAPI 6 is the\u00a0upgrade to bash-4.2 (the\u00a0earlier EAPIs required bash-3.2). At a\u00a0first glance, it just brings a\u00a0few nice quirks like cleaner fd magic (used by multiprocessing.eclass), case conversion for variables and\u00a0associative arrays. However, aside to that bash compatibility setting is forced \u2014 that could hopefully prevent existing code from breaking in\u00a0future bash versions.<\/p>\n<p>What does this solve, you ask? For example, it solves the\u00a0tilde substitution issue:<\/p>\n<pre><code>PV=\"0_beta1\"\r\nMY_PV=\"${PV\/_\/~}\"<\/code><\/pre>\n<p>The\u00a0above snippet gives the\u00a0expected result only when executed with bash-4.2 and\u00a0lower. However, starting with bash-4.3 it performs tilde expansion on right-hand argument of the\u00a0pattern substitution and\u00a0puts your home directory in\u00a0there. You can disable that via backslash-escaping the\u00a0argument \u2014 but then it puts an\u00a0extra backslash in\u00a0older bash versions! How frustrating\u2026<\/p>\n<p>Now, if we have <code>BASH_COMPAT<\/code> fixed by the\u00a0PM at 4.2, this discrepancy is no longer an\u00a0issue. Because all supported versions of\u00a0bash will force the\u00a0old behavior, you can write the\u00a0code without any conditionals, workarounds or worrying that it will suddenly break sometime in the\u00a0future.<\/p>\n<h2>failglob in\u00a0global scope<\/h2>\n<p>The\u00a0second change to ebuild syntax is that filename expansion is now an\u00a0explicit error in\u00a0global scope. While this may sound scary at first, it wasn&#8217;t ever really supported. Note that this doesn&#8217;t affect phase functions, just the\u00a0code executed when sourcing the\u00a0ebuild. This is mostly targeted towards snippets like the\u00a0following:<\/p>\n<pre><code>inherit python-r1\r\n\r\nRDEPEND=\"$(python_gen_cond_dep 'dev-python\/foo[${PYTHON_USEDEP}]' python2*)\"<\/code><\/pre>\n<p>Do you see the\u00a0problem here? <code>python2*<\/code> lacks quoting. This usually doesn&#8217;t cause any issues but if you happened to be in a\u00a0directory with <code>pythonFOOBAR<\/code> file while sourcing the\u00a0ebuild, it would suddenly pick it up and\u00a0return pretty unexpected results. As a\u00a0solution, an\u00a0EAPI=6 ebuild would instantly abort here and\u00a0require you to quote the\u00a0pattern.<\/p>\n<h2>LC_COLLATE and LC_CTYPE settings<\/h2>\n<p>The\u00a0description for locale settings may seem a\u00a0little blurry but that&#8217;s for a\u00a0reason. The\u00a0original idea was that the\u00a0Package Manager would export (pretty much like Paludis does):<\/p>\n<pre><code>LC_COLLATE=C\r\nLC_CTYPE=C<\/code><\/pre>\n<p>to enforce stable sorting and\u00a0case conversions. Without the\u00a0former, some locales could cause results of\u00a0globs such as patch files to apply in\u00a0different order. Without the\u00a0latter, some locales could give unexpected results of case changes. In particular, the\u00a0Turkish <code>tr_TR.UTF-8<\/code> locale is only too happy to map lowercase \u2018i\u2019 to uppercase \u2018\u0130\u2019 (yep, it has a\u00a0dot above!)<\/p>\n<p>So why is it worded this muddy? Because of our lovely Python and\u00a0the\u00a0lot of\u00a0high quality scripts that are only too happy to interpret read files in the\u00a0charset corresponding to the\u00a0current locale, and\u00a0therefore bail out hard when they don&#8217;t conform to the\u00a0ASCII charset implied by the\u00a0<code>C<\/code> locale.<\/p>\n<p>So instead of\u00a0<code>C<\/code>, we need a\u00a0<code>C.UTF-8<\/code> which hasn&#8217;t made its way into glibc for\u2026 how long exactly? Not to mention the\u00a0portability. Therefore, we just request a\u00a0seemingly sane locale, and\u00a0hope we can work something out. In\u00a0implementation, the\u00a0Package Manager will most likely set <code>LC_COLLATE=C<\/code> directly and\u00a0complain to the\u00a0user if\u00a0his <code>LC_CTYPE<\/code> does not conform.<\/p>\n<p>Nevertheless, in\u00a0EAPI\u00a06 you should be able to safely remove your local <code>LC_COLLATE<\/code> and\u00a0<code>LC_CTYPE<\/code> redefinitions, and\u00a0hopefully also most of\u00a0those excessive <code>LC_ALL<\/code> settings.<\/p>\n<h2>eapply, eapply_user and\u00a0src_prepare()<\/h2>\n<p>This is probably the\u00a0most controversial feature of the\u00a0new EAPI. Those functions are intended as reasonably simple and\u00a0predictable replacements for the\u00a0commonly used eutils.eclass beasts, with new default <code>src_prepare()<\/code> to finish off the\u00a0long-deprecated base.eclass.<\/p>\n<p><code>eapply<\/code> has a\u00a0few substantial differences from <code>epatch<\/code>. However, I hope that people will nevertheless decide to abandon the\u00a0latter, and\u00a0use the\u00a0new function, effectively also reducing the\u00a0use of\u00a0eutils.eclass. The\u00a0differences are:<\/p>\n<ul>\n<li>No <code>-p*<\/code> guessing. Instead, it defaults to <code>-p1<\/code> and\u00a0lets you override it. Now patches can apply predictably.<\/li>\n<li>No magical configuration variables. All options are passed as\u00a0parameters, followed by files. If options need to take separate arguments, <code>--<\/code> is provided to separate options from files.<\/li>\n<li>No compression support. There&#8217;s <code>unpack<\/code> that usually does that for you, you know, and\u00a0patches in\u00a0<code>${FILESDIR}<\/code> are never compressed.<\/li>\n<li>Simple directory handling. It just applies all <code>*.diff<\/code> and <code>*.patch<\/code> files from a\u00a0directory. No custom suffixes, no exclusions.<\/li>\n<\/ul>\n<p>While this may sound like a\u00a0lot was lost, the\u00a0function is still quite big and\u00a0even twice as\u00a0useful. Most importantly, all patches now apply (or fail) pretty predictably, and\u00a0if they do fail, you get a\u00a0clear output.<\/p>\n<p><code>eapply_user<\/code> provides user patch support on top of\u00a0<code>eapply<\/code>. However, since user patches are a\u00a0matter of\u00a0configuration, the\u00a0PMS really leaves the\u00a0details to the\u00a0Package Manager, and doesn&#8217;t even prohibit it from extending patching beyond <code>eapply<\/code>. <code>eapply_user<\/code> is considered obligatory, and\u00a0can be safely called more than once (applying patches only the\u00a0first time) to make eclass writing easier.<\/p>\n<p>Both function are used in\u00a0the\u00a0default <code>src_prepare()<\/code> implementation which was inspired by the\u00a0common implementations shared between multiple eclasses. In\u00a0particular, it applies patches from the\u00a0<code>PATCHES<\/code> variable (array strongly preferred due to <code>${FILESDIR}<\/code>) and\u00a0then user patches. Please note that in\u00a0some cases, it would be advised to remove <code>src_prepare()<\/code> from your eclass altogether rather than calling the\u00a0default from it.<\/p>\n<h2>einstalldocs and\u00a0src_install()<\/h2>\n<p>This one&#8217;s much simpler and\u00a0accepted in\u00a0full agreement. It combines two categories of\u00a0requests created against the\u00a0documentation install code introduced in\u00a0EAPI\u00a04. Firstly, it splits the\u00a0code off <code>default_src_install()<\/code> so that it can be reused without implicitly calling <code>emake install<\/code>. Secondly, it solves a\u00a0number of\u00a0problems with the\u00a0original implementation.<\/p>\n<p>So what&#8217;s the\u00a0story here? EAPI\u00a04 introduced a\u00a0very nice <code>src_install()<\/code> phase which was able to install a\u00a0few default documentation pieces automatically. That was quite liked, except that it was tightly bound with the\u00a0default <code>emake install<\/code> call. As a\u00a0result, a\u00a0number of\u00a0eclasses ended up (still) redefining it, with the\u00a0most noticeable example of\u00a0base.eclass having a\u00a0split phase function for it. But since the\u00a0eclass was long deprecated already, other eclasses had to copy the\u00a0code rather than reuse it.<\/p>\n<p>The\u00a0idea of having a\u00a0split function arose early during EAPI\u00a06 work. While writing a\u00a0new function, the\u00a0issues and\u00a0requests against the\u00a0current default were collected and\u00a0considered. Finally, the\u00a0new function was given to early Council approval, and\u00a0committed to eutils.eclass as\u00a0a\u00a0backport of\u00a0the\u00a0future EAPI\u00a06 function. And as you can see now, it lands in\u00a0EAPI\u00a06 in\u00a0exactly the\u00a0same form, replacing the\u00a0eutils implementation.<\/p>\n<p>As a\u00a0reminder, the\u00a0changes from the\u00a0original EAPI\u00a04 implementation are:<\/p>\n<ul>\n<li>empty <code>DOCS<\/code> variable disables installing documentation completely. Previously, it was undefined behavior (usually a\u00a0<code>dodoc<\/code> usage error).<\/li>\n<li>The\u00a0<code>DOCS<\/code> variable can name directories as well as files.<\/li>\n<li>A\u00a0<code>HTML_DOCS<\/code> variable has been added. It installs the\u00a0listed files and\/or directories (using <code>dodoc<\/code>, not deprecated <code>dohtml<\/code>!) into the\u00a0<code>html\/<\/code> subdirectory of docdir.<\/li>\n<\/ul>\n<p>As a\u00a0result, the\u00a0default <code>src_install()<\/code> implementation differs by the\u00a0documentation install changes listed above. If you were overriding this phase just to get <code>einstalldocs<\/code> into it, you can remove it. If you were using <code>einstalldocs<\/code> from eutils.eclass, you do not have to inherit it anymore. And if you were inlining your own documentation install code, it is a\u00a0good idea to replace it with standard one in\u00a0EAPI\u00a06.<\/p>\n<h2>get_libdir and econf changes<\/h2>\n<p>The\u00a0next major target for EAPI\u00a06 changes was the\u00a0<code>econf<\/code> function, commonly used in\u00a0<code>src_configure()<\/code>. Here, two goals were achieved. Firstly, a\u00a0<code>get_libdir<\/code> function inspired by multilib.eclass was added. Secondly, <code>--docdir<\/code> and\u00a0<code>--htmldir<\/code> parameters are now passed to configure scripts.<\/p>\n<p>Why would <code>get_libdir<\/code> be related to <code>econf<\/code> at all? Well, except for the\u00a0fact that it&#8217;s often used in\u00a0configure script arguments, it pretty much shares the\u00a0logic used to figure out libdir. So we&#8217;re not just moving a\u00a0commonly used eclass function to the\u00a0EAPI \u2014 we&#8217;re splitting the\u00a0libdir determination logic off <code>econf<\/code>, and\u00a0sharing it with ebuilds.<\/p>\n<p>As for the\u00a0two new parameters \u2014 <code>--docdir<\/code> and\u00a0<code>--htmldir<\/code> \u2014 I don&#8217;t think they really need any comment here.<\/p>\n<h2>in_iuse<\/h2>\n<p>This one&#8217;s very controversial as\u00a0well, and\u00a0I&#8217;d personally prefer not having to introduce it at\u00a0all. However, without it the\u00a0developers would still resort to ugly hacks, so better to have a\u00a0safe alternative. So, what&#8217;s the\u00a0background?<\/p>\n<p>Some developers found it quite convenient to do some conditionals in\u00a0eclasses based on what ends up in\u00a0<code>IUSE<\/code>. For example, if\u00a0the\u00a0ebuild has <code>IUSE=static-libs<\/code>, we magically enable code controlling static library build and\u00a0install. Except for being ugly, this design had two major issues. Firstly, the\u00a0code checking that was inconsistent and\u00a0often buggy \u2014 some eclasses handled <code>+static-libs<\/code>, some didn&#8217;t. Secondly, the\u00a0specification never mandated <code>IUSE<\/code> having any sane value throughout phase functions. So the\u00a0results could have been quite surprising.<\/p>\n<p>EAPI\u00a06 solves both of those issues by\u00a0providing a\u00a0standard <code>in_iuse<\/code> function. All uses implementation-defined magic to check whether the\u00a0specified flag is listed in\u00a0the\u00a0<code>IUSE_EFFECTIVE<\/code> conceptual variable. This includes not only flags set by\u00a0ebuilds and\u00a0eclasses but also implicitly added by\u00a0profiles \u2014 in\u00a0other words, any flag that is legal to the\u00a0<code>use<\/code> function call.<\/p>\n<p>I should note that <code>in_iuse<\/code> is legal only in\u00a0phase functions \u2014 it is disallowed in\u00a0global scope (i.e. while <code>IUSE<\/code> is still subject to changes). Nevertheless, I would heartily recommend avoiding it and\u00a0using explicit conditional variables instead.<\/p>\n<h2>nonfatal die<\/h2>\n<p>Did you happen to dislike how some eclass-defined helpers could not be <code>nonfatal<\/code> properly? That&#8217;s no longer the\u00a0case with EAPI\u00a06. The\u00a0<code>die<\/code> function has gained a\u00a0simple <code>-n<\/code> option which makes it respect <code>nonfatal<\/code>, and\u00a0therefore be a\u00a0no-op when it is in\u00a0effect.<\/p>\n<p>In\u00a0other words, you can write helpers like the\u00a0following:<\/p>\n<pre><code>efoo() {\r\n\t#...\r\n\tfoo || die -n \"foo failed\" || return ${?}\r\n\t#...\r\n}<\/code><\/pre>\n<p>where <code>die<\/code> would simply return false and\u00a0continue execution if\u00a0<code>nonfatal<\/code> is in\u00a0effect. Please remember that \u2018nonfatal die\u2019 does not <code>return<\/code> from the function implicitly. If you need to do so, you need to explicitly call <code>return<\/code> like in the\u00a0above snippet.<\/p>\n<h2>unpack changes<\/h2>\n<p>Now we&#8217;re past the\u00a0most interesting changes. For completeness, there were few small requests accepted for the\u00a0<code>unpack<\/code> function:<\/p>\n<ul>\n<li>Absolute and\u00a0non-prefixed relative paths can be used now. The\u00a0path handling is still a\u00a0little creepy since pure filename (i.e. without a\u00a0single slash) implicitly references <code>${DISTDIR}<\/code> but anything with a\u00a0slash is treated as a\u00a0regular path.<\/li>\n<li><code>.txz<\/code> suffix is interpreted equivalently to <code>.tar.xz<\/code>. Previously, only the\u00a0long form was accepted.<\/li>\n<li>Suffix matching is case-insensitive now. Which means that <code>.ZIP<\/code> works as\u00a0well as\u00a0<code>.zip<\/code>. Hooray, we can now handle 8.3 filenames cleanly!<\/li>\n<\/ul>\n<h2>einstall banned, dohtml deprecated<\/h2>\n<p>Aside to new features, there are two important removals to be noted. The\u00a0long-discouraged <code>einstall<\/code> function has been finally banned, and\u00a0the\u00a0<code>dohtml<\/code> function has been deprecated with the\u00a0goal of\u00a0removing it in\u00a0EAPI\u00a07.<\/p>\n<p>The\u00a0<code>einstall<\/code> command was intended as a\u00a0cheap work-around for build systems that did not support <code>DESTDIR=<\/code> argument to <code>emake install<\/code>. Instead, it redefined a\u00a0number of direct install paths (such as <code>bindir=<\/code>), passing the\u00a0staging area path and\u00a0target directory combined. Sadly, it has often been cause of\u00a0confusion for new developers who have seen it as\u00a0the\u00a0standard install command (in\u00a0line with <code>econf<\/code>, <code>emake<\/code>\u2026).<\/p>\n<p>Over a\u00a0year ago, I&#8217;ve started tracking uses of\u00a0<code>einstall<\/code> on\u00a0behalf of\u00a0QA, and\u00a0noticed that most of\u00a0the\u00a0uses were completely unnecessary, either because the\u00a0build system in\u00a0question handled <code>DESTDIR=<\/code> correctly, or had a\u00a0custom variable serving the\u00a0same purpose. Furthermore, the\u00a0function used parameter names matching autoconf while it was intended to deal with custom build systems which may require other variables. Therefore, it was decided that it is better to ban the\u00a0command and\u00a0inline the\u00a0relevant make parameters whenever really unavoidable.<\/p>\n<p>The\u00a0<code>dohtml<\/code> function has been the\u00a0official way of\u00a0installing HTML documentation for quite a\u00a0long time. No other command defined by\u00a0PMS had as\u00a0many options. Confusingly to some developers, it provided implicit filtering by file suffixes, with additional options to add additional suffixes, replace suffix list, filter by filename, exclude directories and\u00a0directly alter install path. Moreover, there was yet another enhancement request asking for new suffixes in\u00a0the\u00a0default filter.<\/p>\n<p>The\u00a0Council has agreed with us that the\u00a0function is overcomplex and\u00a0confusing, and\u00a0will be an\u00a0object of never-ending requests and\u00a0updates. Most of Gentoo developers have seen it as a\u00a0way of installing files in\u00a0the\u00a0<code>html\/<\/code> subdirectory of\u00a0docdir while it did so much more \u2014 and\u00a0potentially confused them by excluding some files. It also resulted in\u00a0absurd situations like people moving gtk-doc files out of the\u00a0standard location used by\u00a0gtk-doc just to match the\u00a0\u2018standard\u2019 established by\u00a0the\u00a0function.<\/p>\n<p><code>dohtml<\/code> is officially deprecated since EAPI\u00a06, and\u00a0is expected to be\u00a0banned in\u00a0EAPI\u00a07. The\u00a0suggested replacement is <code>dodoc<\/code> which is much simpler, faster and\u00a0in\u00a0many cases will work the\u00a0same (or even better, by restoring the\u00a0files that were mistakenly missed by\u00a0<code>dohtml<\/code>). It is possible that the\u00a0current <code>dohtml<\/code> will eventually be moved to an\u00a0eclass for the\u00a0ebuilds that require filtering, yet the\u00a0fate of\u00a0this idea is unclear yet.<\/p>\n<p>To help with the\u00a0migration, Portage provides the following quirk (for <code>make.conf<\/code> or environment):<\/p>\n<pre><code>PORTAGE_DOHTML_WARN_ON_SKIPPED_FILES=yes<\/code><\/pre>\n<p>When run with this, each <code>dohtml<\/code> invocation will verbosely list all files that were skipped through filtering. A\u00a0null output indicates that <code>dohtml<\/code> can be safely replaced by\u00a0<code>dodoc<\/code>.<\/p>\n<h2>Global-scope helpers banned in\u00a0Portage<\/h2>\n<p>EAPI\u00a06 brings not only the\u00a0spec changes but also new strictness to\u00a0Portage. In\u00a0particular, almost all helper functions are now banned in\u00a0global scope, as they are banned by\u00a0PMS and\u00a0other package managers. What does this imply? Most importantly, toolchain&#8217;s use of <code>USE=multislot<\/code> is now officially banned and\u00a0will no longer work in\u00a0EAPI\u00a06.<\/p>\n<h2>Eclasses banned in EAPI 6<\/h2>\n<p>Finally, the\u00a0changes brought by EAPI\u00a06 will likely result in\u00a0a\u00a0number of API changes in\u00a0multiple eclasses. Moreover, some of\u00a0the\u00a0existing eclasses will become completely unnecessary and\u00a0will be banned.<\/p>\n<p>The\u00a0most important example here is the\u00a0base.eclass which was semi-officially deprecated for a\u00a0long time. In EAPI\u00a06, it is fully replaced by\u00a0default phase functions and\u00a0must not be used. Similarly, I&#8217;ve decided to discontinue and\u00a0ban autotools-utils.eclass and\u00a0autotools-multilib.eclass, the\u00a0former serving a\u00a0similar purpose as\u00a0base.eclass did in\u00a0the past and\u00a0the\u00a0latter being just a\u00a0wrapper atop multilib-minimal.eclass.<\/p>\n<p>Aside to that, I&#8217;ve banned a\u00a0number of eclasses that are deprecated currently, to avoid their use being carried on to the\u00a0next EAPI.<\/p>\n<h2>Summary<\/h2>\n<p>To summarize all the\u00a0changes in\u00a0EAPI\u00a06, let me assemble a\u00a0check list of tasks that need to be done when updating ebuilds to EAPI\u00a06:<\/p>\n<ol>\n<li>You can update your bash code to use bash-4.2 features, and\u00a0remove unnecessary conditionals for future-incompatible behavior. It is unlikely that you have any.<\/li>\n<li>Ensure that all patterns that are supposed to be passed as-is to functions are quoted.<\/li>\n<li>Remove unnecessary <code>LC_COLLATE<\/code> and\u00a0<code>LC_CTYPE<\/code> if they only reset it to the\u00a0<code>C<\/code> (or\u00a0<code>POSIX<\/code>) locale.<\/li>\n<li>If you are using <code>epatch<\/code>, try hard to replace it with <code>eapply<\/code>. You may need to pass an\u00a0explicit <code>-p<\/code> value.<\/li>\n<li>If you are using <code>epatch_user<\/code>, you have to replace it with <code>eapply_user<\/code>. If you are not and you define <code>src_prepare()<\/code>, you have to add it there.<\/li>\n<li>If you are left with <code>src_prepare()<\/code> that looks pretty much like the\u00a0default one, drop it. It is also a\u00a0good idea to remove unnecessary <code>src_prepare()<\/code> definitions from eclasses.<\/li>\n<li>If you are using <code>einstalldocs<\/code>, this function is now part of\u00a0EAPI. Don&#8217;t count it as a\u00a0reason to\u00a0inherit eutils.eclass. If you are using a\u00a0similar inline code, it&#8217;s about time you switch to <code>einstalldocs<\/code>.<\/li>\n<li>If you are using <code>in_iuse<\/code>, this function is now part of\u00a0EAPI and\u00a0even really legal. Don&#8217;t count it as a\u00a0reason to\u00a0inherit eutils.eclass. In\u00a0fact, hurry to switch to EAPI\u00a06 to get a\u00a0predictable behavior!<\/li>\n<li>Check if you are still using anything from eutils.eclass. If you are not, remove the\u00a0inherit and\u00a0save a\u00a0few cycles.<\/li>\n<li>If you are using <code>get_libdir<\/code>, this function is now part of\u00a0EAPI. Don&#8217;t count it as a\u00a0reason to\u00a0inherit multilib.eclass. If you are not using anything else from multilib.eclass, remove the\u00a0inherit.<\/li>\n<li>If you are passing standard <code>--docdir<\/code> and\/or <code>--htmldir<\/code> to <code>econf<\/code>, you can remove them. EAPI\u00a06 does that for you.<\/li>\n<li>If you are defining ebuild helpers that should respect <code>nonfatal<\/code>, you should update appropriate <code>die<\/code> to use <code>die -n || return<\/code>. However, please note that it&#8217;s usually a\u00a0good idea to use regular <code>die<\/code> on usage errors, and respect nonfatal only for external errors.<\/li>\n<li>If you are using hacks to support <code>.txz<\/code>, uppercase archive suffixes like <code>.ZIP<\/code> or extracting files by\u00a0absolute or\u00a0relative paths, you can remove them and\u00a0use new <code>unpack<\/code> features.<\/li>\n<li>If you are using <code>einstall<\/code>, remove it. I&#8217;m pretty sure you never really needed it. And\u00a0if you really did, then you most likely missed some custom prefix option in\u00a0upstream build system.<\/li>\n<li>If you are using <code>dohtml<\/code>, consider replacing it with <code>dodoc -r<\/code>. You can set <code>PORTAGE_DOHTML_WARN_ON_SKIPPED_FILES=yes<\/code> before doing that, to see if the\u00a0two will be equivalent.<\/li>\n<li>If you are inheriting base.eclass, autotools-utils.eclass or any of the\u00a0other banned eclasses, make sure to remove it from your eclasses and\u00a0ebuilds.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Now that EAPI\u00a06 is Council-approved and\u00a0pretty close to being deployed, I think it&#8217;s about time to write up a\u00a0not-so-short guide to it. It&#8217;s especially important that EAPI\u00a06 is a\u00a0bit different from the\u00a0previous EAPIs. It was not only seen as an\u00a0opportunity to add new features but also to tidy things up a\u00a0bit and\u00a0improve strictness. If you &hellip; <a href=\"https:\/\/blogs.gentoo.org\/mgorny\/2015\/11\/13\/the-ultimate-guide-to-eapi-6\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Ultimate Guide to EAPI\u00a06&#8221;<\/span><\/a><\/p>\n","protected":false},"author":137,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/364"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/comments?post=364"}],"version-history":[{"count":20,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/364\/revisions"}],"predecessor-version":[{"id":385,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/364\/revisions\/385"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/media?parent=364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/categories?post=364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/tags?post=364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}