Gentoo Archives: gentoo-osx

From: Brian Harring <ferringb@g.o>
To: gentoo-osx@l.g.o
Subject: Re: [gentoo-osx] SheBang script
Date: Wed, 14 Sep 2005 16:46:03
Message-Id: 20050914164554.GH6179@nightcrawler
In Reply to: Re: [gentoo-osx] SheBang script by Grobian
1 On Wed, Sep 14, 2005 at 06:42:55PM +0200, Grobian wrote:
2 >
3 >
4 > Brian Harring wrote:
5 > >>Brian: Is this sort of thing best handled in bash ala bashrc, or is
6 > >>there a good entry point in the portage code to plug this stuff in
7 > >>pythonically?
8 > >
9 > >Kicking around something that would allow setups the ability to plug in
10 > >chunks of code for doing things prior/post merge...
11 > >
12 > >So, hooking within the python side would be possible, and prefered.
13 > >Basically is how collision-protect/setuid scans will be implemented,
14 > >and probably triggering ldconfig runs even (assuming it works sanely).
15 > >
16 > >Less cruft jammed into bash, the better. :)
17 > >~harring
18 >
19 > I personally think this script should be seen as 'proof-of-concept'.
20 > It's not too fast, and it involves a lot of inefficient work. I'm no
21 > python coder, but I think, given this 'proof-of-concept' it may be
22 > fairly simple to write a function (?) or two in python that performs
23 > this job a few orders of a magnitude faster and more controllable.
24 >
25 > The problem with these kinds of scripts is that their portability is not
26 > really assured. I dubbed whether I would write a quick C version, but
27 > again I stumbled upon the portability question and decided not to do so,
28 > because portage, as inner core of Gentoo, should be as much as possible
29 > unaffected by environmental differences. Python is (like Java) a
30 > solution to that. So, ultimately, this script should be rewritten in
31 > Python.
32 module, not script is prefered.
33
34 Assuming I actually finish triggers and they don't suck, it'll be a
35 passing the func in, not exec'ing a strict.
36 ~harring

Replies

Subject Author
Re: [gentoo-osx] SheBang script Brian Harring <ferringb@g.o>
Re: [gentoo-osx] SheBang script Grobian <grobian@g.o>