TIP The /etc/portage/bashrc file
From Gentoo Linux Wiki
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Contents |
[edit] Warning
Keep in mind that using bashrc in portage isn't supported, even if you use bashrcs from developers. So if you use one and things start breaking, you keep the pieces.
[edit] /etc/portage/bashrc
This file is one that is executed with certain parameters in various stages of an emerge. See http://article.gmane.org/gmane.linux.gentoo.hardened/1204 for more information. Don't forget to replace all " <at> " by "@" there :) Here are some examples from some Gentoo developers:
[edit] Solar's example bashrc
From http://dev.gentoo.org/~solar/portage_misc/bashrc, this allows the 'distclean' FEATURES variable (to remove items from $DISTDIR after you're done with it), 'rats' and 'flawfinder' FEATURES flags (to run security checks on programs, along with support for simple /etc/portage/packages.cflags
An example of the first file's syntax can be seen at http://dev.gentoo.org/~solar/portage_misc/package.cflags
[edit] ferringb's example bashrc
At http://dev.gentoo.org/~ferringb/bashrc this bashrc is designed for portage cvs head (not stable 2.0.51.x). It takes advantage of pre/post phase hooks to indicate what LD_PRELOAD protection and id the ebd is running as.
Beyond that, it has a hijacking of filter-env (c based bash parser for env filtering) to enable various, rather useful options to get debugging output from filter-env. Whether it be allowing it to dump core, having it dump the full env it was handed to full-dump-${EBUILD_PHASE}, or just valgrinding the bugger.
[edit] An older one
The one at http://dev.gentoo.org/~solar/portage_misc/ferringb/bashrc seems to be a predecessor to solar's, this one seems nothing but debugging and package.cflags
