From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EFaLt-0006rS-V7 for garchives@archives.gentoo.org; Wed, 14 Sep 2005 16:43:18 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j8EGcB58029217; Wed, 14 Sep 2005 16:38:11 GMT Received: from hermes.orakel.ods.org (dsl67-66.fastxdsl.nl [62.251.66.67]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j8EGcBqq005098 for ; Wed, 14 Sep 2005 16:38:11 GMT Received: from aphrodite.orakel.ods.org ([172.17.2.15]) by hermes.orakel.ods.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1EFaLZ-0005vb-3S for gentoo-osx@lists.gentoo.org; Wed, 14 Sep 2005 18:42:57 +0200 Message-ID: <4328530F.1020701@gentoo.org> Date: Wed, 14 Sep 2005 18:42:55 +0200 From: Grobian Organization: Gentoo Foundation User-Agent: Thunderbird 1.0+ (Macintosh/20050813) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-osx@gentoo.org Reply-to: gentoo-osx@lists.gentoo.org MIME-Version: 1.0 To: gentoo-osx@lists.gentoo.org Subject: Re: [gentoo-osx] SheBang script References: <43273D5D.7040308@gentoo.org> <20050914163318.GG6179@nightcrawler> In-Reply-To: <20050914163318.GG6179@nightcrawler> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Scanned: by hermes.orakel.ods.org (Exim Exiscan) using SpamAssassin and ClamAV X-Archives-Salt: 579f72ea-b704-4ca1-81df-a3de305a04d9 X-Archives-Hash: cc190831077621d50d7140b316320320 Brian Harring wrote: >> Brian: Is this sort of thing best handled in bash ala bashrc, or is >> there a good entry point in the portage code to plug this stuff in >> pythonically? > > Kicking around something that would allow setups the ability to plug in > chunks of code for doing things prior/post merge... > > So, hooking within the python side would be possible, and prefered. > Basically is how collision-protect/setuid scans will be implemented, > and probably triggering ldconfig runs even (assuming it works sanely). > > Less cruft jammed into bash, the better. :) > ~harring I personally think this script should be seen as 'proof-of-concept'. It's not too fast, and it involves a lot of inefficient work. I'm no python coder, but I think, given this 'proof-of-concept' it may be fairly simple to write a function (?) or two in python that performs this job a few orders of a magnitude faster and more controllable. The problem with these kinds of scripts is that their portability is not really assured. I dubbed whether I would write a quick C version, but again I stumbled upon the portability question and decided not to do so, because portage, as inner core of Gentoo, should be as much as possible unaffected by environmental differences. Python is (like Java) a solution to that. So, ultimately, this script should be rewritten in Python. -- Fabian Groffen Gentoo for Mac OS X -- gentoo-osx@gentoo.org mailing list