Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473800 - media-libs/x264{-0.0.20130506,-9999} call inherit twice
Summary: media-libs/x264{-0.0.20130506,-9999} call inherit twice
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 12:16 UTC by Alexis Ballier
Modified: 2013-06-19 18:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ballier gentoo-dev 2013-06-19 12:16:51 UTC
inherit flag-o-matic multilib toolchain-funcs

...

if [[ ${PV} == 9999 ]]; then
    inherit git-2
...
else
    inherit versionator
...



plz fix quickly or i'll revert the whole bump
Comment 1 Nikoli 2013-06-19 15:29:57 UTC
Why multiple inherit is mistake? As i know it is preferred in some cases. And instead of 'inherit something $somevar' it is better to use several inherit.
Comment 2 Alexis Ballier gentoo-dev 2013-06-19 15:42:00 UTC
(In reply to Nikoli from comment #1)
> Why multiple inherit is mistake? As i know it is preferred in some cases.
> And instead of 'inherit something $somevar' it is better to use several
> inherit.

it is prettier that way indeed but see bug #54156 and:
http://devmanual.gentoo.org/ebuild-writing/using-eclasses/index.html

To use an eclass, it must be 'inherited'. This is done via the inherit function, which is provided by ebuild.sh. The inherit statement must come at the top of the ebuild, before any functions. Conditional inherits are illegal (except where the inheritance criteria are cache-constant — see The Portage Cache).



The bug is old, pms doesnt seem to say anything about it but devmanual says '_the_ inherit statement' sort of implying it has to be unique to me.
Comment 3 Patrick McLean gentoo-dev 2013-06-19 18:05:12 UTC
Calling inherit twice is pretty standard procedure, several eclasses and some base-system packages do it (have a look at sys-apps/file-9999).

Given the ebuild is EAPI=5 I don't think we need to worry about it being installed with ancient versions of portage that can't handle this.