On 12-09-2014 22:12, Mike Miller wrote:
Hi Fabricio, I have also run into this problem when building modules-based rpms when the user shell is zsh or (sadly) tcsh.
Hi Mike.
I think the reason why the module command works when your shell is bash is because bash is the only shell that supports exporting shell functions (export -f). In all other shells, the module command is a shell function or alias, but can't be exported through the environment to subshells. Since /etc/profile.d/modules.sh is only loaded in interactive shells, it isn't loaded by the rpm build shell scriptlets for example.
I see, but wouldn't the 'module' function be exported when rpmbuild enters the '%build' section of the spec file ?
The only solution I've found is to start an interactive bash shell before rpmbuild, or source the file as you've done.
Is there a way to overload '%build' so that it sources the needeed scripts automatically ?
[ ]'s _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list