Gentoo Archives: gentoo-osx

From: Finn Thain <fthain@××××××××××××××××.au>
To: gentoo-osx@l.g.o
Subject: Re: [gentoo-osx] env.d; perl with collision-protect
Date: Fri, 19 Aug 2005 04:14:10
Message-Id: Pine.LNX.4.63.0508191327260.5039@loopy.telegraphics.com.au
In Reply to: [gentoo-osx] env.d; perl with collision-protect by Hasan Khalil
1 On Thu, 18 Aug 2005, Hasan Khalil wrote:
2
3 > The Background:
4 >
5 > Perl is almost ready for the default (collision-protect) profiles. I've
6 > modified the latest perl ebuild to install all binaries (normally
7 > installed to '/usr/bin') into another location
8 > (/System/Library/Perl/${PV}/bin) to avoid collisions. No other
9 > collisions are created by the perl ebuild. I'll make these revisions
10 > more public once I can get them tested more thoroughly (I already broke
11 > Apple's perl on my system, accidentally of course, while working on
12 > Gentoo's perl). There are still a few issues to iron out.
13
14 Nice work!
15
16 > The Issue at Hand:
17 >
18 > One of these issues is providing Gentoo's perl as the default when
19 > `perl` is executed in interactive shells (bash, in my case). The lovely
20 > '/etc/env.d' structure lends itself to the sort of PATH mangling that
21 > needs to be done, but there is one problem here. '/etc/profile.gentoo'
22 > appends the PATH from '/etc/profile.env' to the existing PATH, rather
23 > than inserting to the beginning of the existing PATH.
24
25 This is consistent with the intent of collision-protect. People (users,
26 ISVs) care about the behaviour of Apple's OS X. That is, they care about
27 avoiding collisions in the file system only in as much it preserves that
28 behaviour.
29
30 > This is not just an issue with perl, but also with any other program
31 > that we install to a different prefix and that is also provided by Apple
32 > in the default PATH (later down the line we should have prefixable
33 > installs globally supported by portage 2.1).
34 >
35 > My Proposed Solution:
36 >
37 > I'm thinking that we should have a variable (perhaps in some file in
38 > '/etc/conf.d', or perhaps just in /etc/profile before the line that
39 > sources '/etc/profile.gentoo') that dictates whether or not the
40 > '/etc/profile.env' PATH should take precedence over the default PATH.
41 > All that needs to be done then is to check for this variable in
42 > '/etc/profile.gentoo' and export the PATH appropriately. Of course, one
43 > of the most important things to do would be to document this (both in
44 > the revised baselayout's post-install message, as well as on the web
45 > somewhere).
46
47 I think this is potentially confusing (for some), since you can now have
48 FEATURES saying preserve behaviour yet have a variable saying the
49 opposite.
50
51 Thing is, those people who don't like to change the behaviour of their OS
52 X system will not put Gentoo perl early in the PATH anyway. And if they
53 need Gentoo perl as a dep, then they need a prefixed install.
54
55 So, the easy answer is, let Gentoo's perl overwrite the OS X perl
56 binaries.
57
58 People running collision-protect can just remove that FEATURE for perl
59 (i.e. emerge --onlydeps with collision-protect, then emerge perl without).
60
61 If you take this point of view, it becomes a question of, "how good is
62 Apple's perl at satisfying deps?". If perl can't be effectively
63 package.provided, then the compromise above may not be good enough for
64 those who want both the perl dep and apple's behaviour, and yet can't wait
65 for prefixed installs... Well, I think that is asking too much. I don't
66 think adding potentially conflicting variables is a good response to such
67 demands. I guess it depends on how broken apple's perl is.
68
69 Also, I would caution you against making compromises that will be
70 inappropriate once prefixed installs are available. Compromises in that
71 direction will only have to be undone later. ebuilds that do tricks to
72 avoid collisions will become problems later (for example, imagine you are
73 building stuff under Gentoo/Darwin, and there is no #!/usr/bin/perl, for
74 example, because it was installed in /System/Library/Perl/5.8.6/bin/perl)
75
76 -f
77
78 > What does everyone think?
79 >
80 > --
81 > Hasan Khalil
82 > eBuild and Porting Co-Lead
83 > Gentoo for Mac OS X
84 >
85 >
86 --
87 gentoo-osx@g.o mailing list

Replies

Subject Author
Re: [gentoo-osx] env.d; perl with collision-protect Grobian <grobian@g.o>
Re: [gentoo-osx] env.d; perl with collision-protect Philipp Riegger <lists@××××××××××××.de>