From owner-freebsd-questions@freebsd.org Wed May 20 11:49:23 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA9732CED75 for ; Wed, 20 May 2020 11:49:23 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits)) (Client CN "*.worldserver.net", Issuer "EuropeanSSL Server CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49RrdG6g3Tz46pg for ; Wed, 20 May 2020 11:49:22 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from postpony.nebelschwaden.de (v22018114346177759.hotsrv.de [194.55.14.20]) (Authenticated sender: postmaster@nebelschwaden.de) by mail.worldserver.net (Postfix) with ESMTPA id 8252026AB1 for ; Wed, 20 May 2020 13:49:20 +0200 (CEST) Received: from [172.16.37.5] (kaperfahrt.nebelschwaden.de [172.16.37.5]) by postpony.nebelschwaden.de (Postfix) with ESMTP id 15FB2D910F for ; Wed, 20 May 2020 13:49:20 +0200 (CEST) Reply-To: listac@nebelschwaden.de Subject: Re: Moving sources (base/ports) from /usr To: freebsd-questions@freebsd.org References: <8d48921e-7af1-9313-0781-4ba4bd9c1f10@nebelschwaden.de> <20200520110833.f47610a48f0f28dd563c13aa@sohara.org> <2c3bd26c-aaa3-9998-e5e5-e3f4f3796ffc@nebelschwaden.de> <0b98639e-e714-412c-950e-7d20be5d1147@hedeland.org> From: Ede Wolf Message-ID: Date: Wed, 20 May 2020 13:49:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <0b98639e-e714-412c-950e-7d20be5d1147@hedeland.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49RrdG6g3Tz46pg X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of listac@nebelschwaden.de has no SPF policy when checking 217.13.200.26) smtp.mailfrom=listac@nebelschwaden.de X-Spamd-Result: default: False [2.41 / 15.00]; HAS_REPLYTO(0.00)[listac@nebelschwaden.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.54)[0.541]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_SPAM_MEDIUM(0.97)[0.973]; RCVD_IN_DNSWL_NONE(0.00)[217.13.200.26:from]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[nebelschwaden.de]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15657, ipnet:217.13.192.0/20, country:DE]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 11:49:23 -0000 Sometimes, being pedantic helps quite a bit: ... (fresh login) # echo $SOURCEDIR /clutter/src # env | grep SOURCEDIR # # SOURCEDIR="/clutter/src" # export SOURCEDIR # env | grep SOURCEDIR SOURCEDIR=/clutter/src 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >