Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-devhelp
On Sunday, May 27, 2012 11:21:31 PM Nikos Chantziaras wrote:
> I have this in /etc/portage/package.env:
>
> app-emulation/emul-linux-x86-soundlibs soundlibs-delete-jack.conf
>
> and this in /etc/portage/env/soundlibs-delete-jack.conf:
>
> if [ "${EBUILD_PHASE}" == "src_prepare"] ;
> then
> rm -rf "${S}"/usr/lib32/jack
> rm -f $(find "${S}" -name 'libjack*')
> fi
The env/!(bashrc) files are parsed using Python shlex at the time emerge is
run, accepting essentially the same types of expressions that are valid in
/etc/make.conf. It never goes through a shell. The reason this is "preferred"
is certainly for performance, and due to certain things not being possible in
abashrc such as setting FEATURES.
The two options for defining phase hooks are the portage/bashrc file, and
portage/env/CATEGORY/PKG. The bashrc file is global and if present always runs,
while the package-specific ones are of course package-specific.
Personally, I just use the global bashrc and handle the logic for selecting
packages internally. I find it a bit easier to manage than many separate files.
setupHookPtrs() {
set -- "$@" 'categoryPtrs["$1"]' "$1"'["$2"]'
local -A categoryPtrs=(
[app-shells]='(
[bash]=doBash
[ksh]=doKsh
)'
[media-gfx]='(
[digikam]=dgKamFix
)'
[sys-devel]='(
[binutils]=doBinutils
)'
[www-client]='(
[chromium]=chromiumHack
)'
) \
${categoryPtrs["$1"]+"$1"="${!3}"}
${categoryPtrs["$1"]+"${!4-:}"} # Call whatever function.
}
setupHookPtrs "$CATEGORY" "$PN"
--
Dan Douglas |
| Attachment: |
|
signature.asc (This is a digitally signed message part.)
|
|