From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.105.134.102] (helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1DiJ6S-0004pT-Hu for garchives@archives.gentoo.org; Tue, 14 Jun 2005 21:37:49 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j5ELZMP8014396; Tue, 14 Jun 2005 21:35:22 GMT Received: from cpanel2.fuitadnet.com (cpanel2.fuitadnet.com [67.15.28.4]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j5ELTu9n000856 for ; Tue, 14 Jun 2005 21:29:57 GMT Received: from [24.183.201.14] (helo=[192.168.1.100]) by cpanel2.fuitadnet.com with esmtpa (Exim 4.44) id 1DiEBc-0006Mt-EB for gentoo-dev@lists.gentoo.org; Tue, 14 Jun 2005 11:22:49 -0500 Message-ID: <42AF0457.2060802@gentoo.org> Date: Tue, 14 Jun 2005 11:22:47 -0500 From: Michael Tindal User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050528) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Even More Portage Bashrc Fun References: <42AC4C02.2020503@gentoo.org> <42AE669F.8020208@dir.bg> In-Reply-To: <42AE669F.8020208@dir.bg> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8042835A0EC5064D789A20C3" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel2.fuitadnet.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gentoo.org X-Source: X-Source-Args: X-Source-Dir: X-Archives-Salt: 61abc8fe-f6b5-47d9-bc30-182bedc34574 X-Archives-Hash: 388aee1dea4f07801c68fbd121e6e935 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8042835A0EC5064D789A20C3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Rumen Yotov wrote: > Michael Tindal wrote: > > >>Hello, >> >>So a long time ago solar wrote a bashrc for portage, and posted it on >>this mailing list for everyone to see. I took it, and started extending >>it with various things of my own design, and some contributions from >>others. I've since updated it with the things solar's been adding to >>his bashrc, plus adding the functionality from ChrisWhites bashrc. >>Well, adding all of that stuff made the bashrc quite large. In addition >>I was using CVS for a while, and wrote a lot of hooks to work with CVS, >>when I went back to 2.0.51, I didnt want to lose all of those, so I >>backported in a way the hooks from CVS (I mean in a way because the post >>hooks arent really post hooks, they just run before the pre hook of the >>next phase), but that meant the bashrc was huge. >> >>So, sometime last night or this morning I set out to create a modular >>portage bashrc [1], and I have done so. I'll admit, the code is ugly, >>and it probably could've been done better. But it does lay a good >>framework for future extensions. >> >>The bashrc file is just a skeleton that loads the modules, and handles >>the pseudo-hook implementation. The real magic happens in the >>bashrc-modules subdirectory. core-functions.bmod contains the basic >>functions and handles loading other modules. hooks.bmod defines the >>hooks used and defines functions used to add new function calls to the >>hooks. The other bmod files define some sort of library for other >>modules (like an eclass) or functions that get loaded into the hooks. I >>don't have any documentation written up for that, so read through the >>source and you should get an idea of how it all works. >> >>The BASHRC_DYN_MODULES variable can be defined in make.conf to limit the >>modules that are loaded by the bashrc. This is useful if you only want >>to use a subset of the functionality available in the modules, and dont >>want to load them all. The default behavior is to load all of the >>modules under ${ROOT}/etc/portage/bashrc-modules/. To extend the >>bashrc, for example, to add another feature, you simply create a new >>bmod following the examples given, then either let it load automatically >>or add it to BASHRC_DYN_MODULES. >> >>I've done some thorough testing and beu did some testing as well, so >>there shouldnt be any major bugs, but if you find some, please e-mail me >>with them. I'm especially interested in command not found errors. This >>is some really ugly bash code, so if you run into obscure errors, dont >>freak out, theyre a result of how I deal with the infrastructure. >>Overall though, it appears to be stable, and I'm currently using it on >>my system. >> >>Finally, I'd like to thank the people who directly or indirectly helped >>with this bashrc and the bashrc system: solar, ChrisWhite, beu, >>bluefoxicy, and anyone else who I forgot to name. Enjoy everyone! >> >>Mike Tindal >> >>PS: Heed the warning given in the setup phase, you *cannot* modify >>variables that affect depends because the environment the bashrc >>modifies isnt picked up by depends. Be very careful with what you do >>with category.use, since that can very easily break builds. >> >>[1] >>http://dev.gentoo.org/~urilith/portage-tools/bashrc-2.0.51-modular-20050612.tar.bz2 >> >>I've got some sample files in that dir for the random files the bashrc >>supports. >> >> > > Hi, > Till now used the old/org bashrc-script plus package.* files. > Now when replaced them with the new one get some errors, seems just > syntax ones. > Here's the log when using it: > ... > >>>>Loading module hooks.bmod... >>>>Loading module string-utils.bmod... >>>>Loading module audit.bmod... >>>>Loading module autooverlay.bmod... >>>>Loading module autopatch.bmod... >>>>Loading module conf.bmod... >>>>Loading module distdir-clean.bmod... >>>>Loading module enotice.bmod... >>>>Loading module etc-portage.bmod... > > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 103: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 104: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 108: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 109: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 103: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 104: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 108: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 109: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 103: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 104: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 108: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 109: syntax > error: unexpected end of file > >>>>Loading module eutils.bmod... >>>>Loading module optipng.bmod... >>>>Loading module pathchk.bmod... >>>>Loading module prelink.bmod... >>>>Loading module setup.bmod... >>>>Loading module whatis.bmod... >>>>root -sandbox(setup) [Enter] > > !!!!!! !!!!!! Do > !!NOT!! use these files to modify variables > that would !!!!!! alter the dependencies of the package. If you > do, things !!!!!! WILL break. This > bashrc has no control before the !!!!!! depend phase, so > the files cannot be used to modify > !!!!!! dependency-related variables. These files are mostly > !!!!!! used to enable features and/or > variables on a per-package !!!!!! basis without having to > cluttler /etc/make.conf !!!!!! -------- WARNING > ON PER-PACKAGE FEATURES IN THIS BASHRC -------- > !!!//etc/portage/bashrc-modules/core-functions.bmod: eval: line 103: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 104: syntax > error: unexpected end of file > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 108: > unexpected EOF while looking for matching `'' > //etc/portage/bashrc-modules/core-functions.bmod: eval: line 109: syntax > error: unexpected end of file > >>>>Using package.cflags entry for target sys-devel for sys-devel/gettext >>>>root +sandbox(setup) [Leave] >>>>root +sandbox(unpack) [Enter] > > /var/tmp/portage/gettext-0.14.4/temp/environment: eval: line 2942: > unexpected EOF while looking for matching `'' > /var/tmp/portage/gettext-0.14.4/temp/environment: eval: line 2943: > syntax error: unexpected end of file > /var/tmp/portage/gettext-0.14.4/temp/environment: eval: line 2946: > unexpected EOF while looking for matching `'' > /var/tmp/portage/gettext-0.14.4/temp/environment: eval: line 2947: > syntax error: unexpected end of file > >>>>Using package.cflags entry for target sys-devel for sys-devel/gettext >>>>Unpacking source... > > ... > PS: will also look into it but not now, later. Will report anything new. > Thanks for your work. Rumen There have been some new releases lately. Look in the portage-tools directory and try again. Also, mail these to me, not the list, since the bugs are my reponsibility :). Mike --------------enig8042835A0EC5064D789A20C3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCrwRarIsAlMe2sSkRAgYdAKCNu5Mv01qgRmgrw1ldeoVURs1chwCeJMUo qW3IWalPzoCdhXofaCvGaXY= =o9Zf -----END PGP SIGNATURE----- --------------enig8042835A0EC5064D789A20C3-- -- gentoo-dev@gentoo.org mailing list