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

Bug 300370

Summary: mips-sources $FILESDIR access during metadata generation phase
Product: Gentoo Linux Reporter: Brian Harring (RETIRED) <ferringb>
Component: New packagesAssignee: MIPS Porters <mips>
Status: RESOLVED FIXED    
Severity: normal CC: qa
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: shift FILESDIR access into pkg_setup

Description Brian Harring (RETIRED) gentoo-dev 2010-01-10 08:50:47 UTC
Basically the eblits bits w/in mips-sources step outside of the normal allowed metadata trickery- the reasoning I understand (basically eclass at the pkg level), but the implementation gets is a bit dodgy.

If you take a look at sys-libs/glibc (where this was lifted from), while at first glance it looks like it sources in global scope, it actually loads the eblits per phase.  Via this, it's evil, but valid.

So... mips-sources needs a changing there.
Comment 1 Brian Harring (RETIRED) gentoo-dev 2010-01-10 09:31:52 UTC
Created attachment 215905 [details, diff]
shift FILESDIR access into pkg_setup

This applies against all ebuilds in the tree.  Basically the trick is thus- instead of doing it global scope, overload pkg_setup to load the eblits if they've not been loaded already (this is pretty similar to how elibs were intended to work actually).

Once they're loaded, then hand off to the eblit loaded pkg_setup.  Voila, or at least 'voila' for my quick tests.
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2010-01-10 09:48:55 UTC
Added into main tree in sake of QA