Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-26 Thread Mike Frysinger
On 26 Jan 2018 11:39, Yunlian Jiang wrote: > I will use a similar issue in lineedit.c to explain the problem. (it is > easier to reproduce). > The problem is that > clang thinks lineedit_ptr_to_statics is a constant pointer, so the pointer > should be unchanged. As a result, inside a function, it

RE: [**EXTERNAL**] Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Cathey, Jim
>I fought through the bash startup scripts almost 20 years ago in >college, and still have "source .bashrc" in my ~/.bash_profile that >I've >been carrying from system to system ever since :-) >and my PATH has never had '.' in it.  Your explanation makes >perfect sense though. My understanding

Re: [**EXTERNAL**] Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Paul Otto
On Fri, Jan 26, 2018 at 10:47 AM, Cathey, Jim wrote: > My understanding, from years past, is that "source " (or ". ") > is _exactly_ the same as "", except that it's running in _this_ shell > rather than in a subshell. Thus it is able to affect environment variables > that

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Michael Conrad
On 1/26/2018 12:47 PM, Cathey, Jim wrote: My understanding, from years past, is that "source " (or ". ") is _exactly_ the same as "", except that it's running in _this_ shell rather than in a subshell. Thus it is able to affect environment variables that subsequent commands can inherit, etc.

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Mike Frysinger
On 26 Jan 2018 15:15, Denys Vlasenko wrote: > On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto wrote: > > This patch restores, and improves upon, expected behavior to BASH > > compatibility which was lost beginning with 1.27.0. This was pulled into > > Alpine 3.7 which, in turn was

RE: [**EXTERNAL**] Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Cathey, Jim
My understanding, from years past, is that "source " (or ". ") is _exactly_ the same as "", except that it's running in _this_ shell rather than in a subshell. Thus it is able to affect environment variables that subsequent commands can inherit, etc. If "." is not in your PATH, and you want

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Michael Conrad
On 1/26/2018 9:15 AM, Denys Vlasenko wrote: On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto wrote: According to the BASH documentation, the source command should: Read and execute commands from filename in the current shell environment and return the exit status of the last

Re: [PATCH 0/2] Add -R to less applet (bug #5546)

2018-01-26 Thread Denys Vlasenko
fixed, thanks On Wed, Jan 24, 2018 at 7:39 AM, Kang-Che Sung wrote: > Hi Denys Vlasenko, > > I think I found a typo in the recent commit > 8528d3d4f8240ab4715f671aa819fe034f0fc285 > >> @@ -106,7 +122,7 @@ >> >> //usage:#define less_trivial_usage >> //usage: "[-E"

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Denys Vlasenko
On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto wrote: > This patch restores, and improves upon, expected behavior to BASH > compatibility which was lost beginning with 1.27.0. This was pulled into > Alpine 3.7 which, in turn was pulled into official Docker images beginning > with

[PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Paul Otto
This patch restores, and improves upon, expected behavior to BASH compatibility which was lost beginning with 1.27.0. This was pulled into Alpine 3.7 which, in turn was pulled into official Docker images beginning with docker:17.12. As a result, a large number of CICD builds that use "source