[pacman-dev] sourcing /etc/profile and set -e bug in makepkg
Allan McRae
allan at archlinux.org
Mon Aug 11 11:24:35 EDT 2008
So, despite me assuring Dan that nothing could possibly go wrong, the
commit to source /etc/profile rather than individual files in
/etc/profile.d
(http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=0e0a8461)
has caused a problem. See FS#11179
(http://bugs.archlinux.org/task/11179) for more details.
Xavier and I are stuck as to what is actually causing this problem. The
guilty script being sourced is /etc/bash_completion.d/modules and
specifically the "type modules" statement at the top. What we don't
understand is that this file is being sourced under both methods and why
it is causing problems only with one. Even more confusing, the way it
gets sourced in /etc/profile is essentially the way makepkg used to do
it (loop over /etc/profile.d/* files).
A work-around is to add "set +e" and "set -e" on either side of the
"source /etc/profile" call. That is probably a good idea anyway as that
sourcing should probably not inherit the "-e" property. But can anyone
explain why we now need this?
Very confused,
Allan
More information about the pacman-dev
mailing list