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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to