Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 473800

Summary: media-libs/x264{-0.0.20130506,-9999} call inherit twice
Product: Gentoo Linux Reporter: Alexis Ballier <aballier>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: RESOLVED INVALID    
Severity: normal CC: media-video, nikoli
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.