Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300370 - mips-sources $FILESDIR access during metadata generation phase
Summary: mips-sources $FILESDIR access during metadata generation phase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MIPS Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 08:50 UTC by Brian Harring (RETIRED)
Modified: 2010-01-10 09:48 UTC (History)
1 user (show)

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


Attachments
shift FILESDIR access into pkg_setup (mips-sources-remove-FILESDIR-abuse.patch,5.82 KB, patch)
2010-01-10 09:31 UTC, Brian Harring (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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