On Tue, Jul 04, 2006 at 11:04:07PM -0700, Zac Medico wrote: > Hi everyone, > > Has anyone noticed that java-pkg-2.eclass makes it difficult to use > pre/post phase hooks in /etc/portage/bashrc?
Yep, they were greenlighted _only_ because it's a workaround for bug #56408, bad environment handling by portage. > Wouldn't it be wise to > provide a function for registering these types of things, so that > more than one can be registered without stomping out others that > were registered before? No. Pre/post are user phase hooks only- their only real reason for existance is because with proper environment handling (namely true store/restoring of the env without having to try recreating it), it's the only way to preserve bashrc functionality. Strictly user level hooks, mandated that way to prevent the ebuild phases from going 2x what's there. If (as you're suggesting) a registration func were added, ebuild devs would also run into issues of registration order, and needing to yank a registered func from one of the hooks... further mess iow. Reiterating, for java pkgs to work properly, the environment _needs_ to be preserved and not stomped per phase change- portages env handling is broke, java usage of it is a stop gap measure rather then having to rewrite all java ebuilds to include per phase env restoring working around portage. pre/post is, and should remain strictly user level except when greenlighted by QA as a bandaid (as this was)- shouldn't be expanded any further (especially since it was an EAPI change that wasn't versioned since it occured prior to EAPI existing). ~harring
pgppA7Sccz56p.pgp
Description: PGP signature