1 |
The Background: |
2 |
|
3 |
Perl is almost ready for the default (collision-protect) profiles. |
4 |
I've modified the latest perl ebuild to install all binaries |
5 |
(normally installed to '/usr/bin') into another location (/System/ |
6 |
Library/Perl/${PV}/bin) to avoid collisions. No other collisions are |
7 |
created by the perl ebuild. I'll make these revisions more public |
8 |
once I can get them tested more thoroughly (I already broke Apple's |
9 |
perl on my system, accidentally of course, while working on Gentoo's |
10 |
perl). There are still a few issues to iron out. |
11 |
|
12 |
The Issue at Hand: |
13 |
|
14 |
One of these issues is providing Gentoo's perl as the default when |
15 |
`perl` is executed in interactive shells (bash, in my case). The |
16 |
lovely '/etc/env.d' structure lends itself to the sort of PATH |
17 |
mangling that needs to be done, but there is one problem here. '/etc/ |
18 |
profile.gentoo' appends the PATH from '/etc/profile.env' to the |
19 |
existing PATH, rather than inserting to the beginning of the existing |
20 |
PATH. This is not just an issue with perl, but also with any other |
21 |
program that we install to a different prefix and that is also |
22 |
provided by Apple in the default PATH (later down the line we should |
23 |
have prefixable installs globally supported by portage 2.1). |
24 |
|
25 |
My Proposed Solution: |
26 |
|
27 |
I'm thinking that we should have a variable (perhaps in some file in |
28 |
'/etc/conf.d', or perhaps just in /etc/profile before the line that |
29 |
sources '/etc/profile.gentoo') that dictates whether or not the '/etc/ |
30 |
profile.env' PATH should take precedence over the default PATH. All |
31 |
that needs to be done then is to check for this variable in '/etc/ |
32 |
profile.gentoo' and export the PATH appropriately. Of course, one of |
33 |
the most important things to do would be to document this (both in |
34 |
the revised baselayout's post-install message, as well as on the web |
35 |
somewhere). |
36 |
|
37 |
What does everyone think? |
38 |
|
39 |
-- |
40 |
Hasan Khalil |
41 |
eBuild and Porting Co-Lead |
42 |
Gentoo for Mac OS X |