Moving sources (base/ports) from /usr

Ede Wolf listac at
Wed May 20 11:49:23 UTC 2020

Sometimes, being pedantic helps quite a bit:

... (fresh login)
# env | grep SOURCEDIR
# SOURCEDIR="/clutter/src"
# export SOURCEDIR
# env | grep SOURCEDIR

Even if this distinction is currently raising more question than it 
answers, it at least explains the behaviour.

And I know I need to rethink my understanding of shell vs. environment 
variables (and the corresponding files).

Thanks for the heads up, with that in mind I'll reread the comment on 
sh(1) and .shrc from before and, well, have a talk with my favourite 
search enginge.

Am 20.05.20 um 13:31 schrieb Per Hedeland:
> On 2020-05-20 13:17, Ede Wolf wrote:
>> My bad. Very sorry. I totally forgot to mention, that root has changed it's login shell to /bin/sh. I do not use csh at all.
>> So /etc/profile is being read and the SOURCEDIR is a valid environmental variable, as can be seen from the first echo $SOURCEDIR.
> To be pedantic, 'echo $SOURCEDIR' does *not* show that SOURCEDIR is
> set in the *environment*, only that it is set in the shell *or* the
> environment. You might want to double-check with
> $ env | grep SOURCEDIR
>> It somehow does just not get handed down to mergemaster - unless exported again on the command line.
>> I'll have a more in depth read through the explanation of Polytropon and sh(1) and certainly will give that a go. Very likely mergemaster calls it's own /bin/sh and that would then require the .shrc.
>> Even though I still maintain, an export in [.]profile should be handed down to every subshell, unless overwritten. But I'm afraid, stubborness does not get me any further, unfortunately.
> Leaving the vagaries of different shells and their rc files aside, I'd
> say that "*a variable set in the environment* should be handed down to
> every *subprocess*, unless overwritten (or explicitly excluded)".
> --Per Hedeland
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list