<feed xmlns='http://www.w3.org/2005/Atom'>
<title>forks/busybox/shell/ash_test/ash-vars, branch master</title>
<subtitle>Busybox tree with Carbs Linux patches
</subtitle>
<id>https://git.carbslinux.org/forks/busybox/atom?h=master</id>
<link rel='self' href='https://git.carbslinux.org/forks/busybox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/'/>
<updated>2021-01-09T07:46:54+00:00</updated>
<entry>
<title>ash: match bash behavior for ${empty_var/*/repl}</title>
<updated>2021-01-09T07:46:54+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=2b7c1aa92c68524559a2067609d09309d5c09adc'/>
<id>urn:sha1:2b7c1aa92c68524559a2067609d09309d5c09adc</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix ${unset_var/pattern/repl}</title>
<updated>2021-01-09T07:27:37+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=883cdb79a440d0425766f67aaef0cabde0a5060e'/>
<id>urn:sha1:883cdb79a440d0425766f67aaef0cabde0a5060e</id>
<content type='text'>
function                                             old     new   delta
subevalvar                                          1349    1353      +4

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: parser: Only accept single-digit parameter expansion outside of braces</title>
<updated>2020-02-17T09:15:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-02-17T09:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=c2ce888030b6b880b3229520a8ff7d7026248a9a'/>
<id>urn:sha1:c2ce888030b6b880b3229520a8ff7d7026248a9a</id>
<content type='text'>
Upstream commit:

    Date: Mon, 27 May 2019 13:39:37 +0800
    parser: Only accept single-digit parameter expansion outside of braces

    This patch should fix the problem.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: remove test for "echo ${-}" errorring out - now it works</title>
<updated>2019-05-19T14:35:56+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-05-19T14:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=30a4c32a4d21728a7e25025f70fcc1d7cd722fe0'/>
<id>urn:sha1:30a4c32a4d21728a7e25025f70fcc1d7cd722fe0</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix quoted "${notexist-}" expansion to not disappear</title>
<updated>2019-05-15T11:39:19+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-05-15T11:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=9e0adb9b09ec14afe2e5a222dda1c447f336ea06'/>
<id>urn:sha1:9e0adb9b09ec14afe2e5a222dda1c447f336ea06</id>
<content type='text'>
function                                             old     new   delta
expand_one_var                                      2296    2311     +15

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: expand: Fix ghost fields with unquoted $@/$*</title>
<updated>2018-08-05T12:29:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T12:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=440da97ed79841b55f0b61e4108a336b61642bff'/>
<id>urn:sha1:440da97ed79841b55f0b61e4108a336b61642bff</id>
<content type='text'>
Upstream commit:

    Date: Fri, 23 Mar 2018 18:58:47 +0800
    expand: Fix ghost fields with unquoted $@/$*

    You're right.  The proper fix to this is to ensure that nulonly
    is not set in varvalue for $*.  It should only be set for $@ when
    it's inside double quotes.

    In fact there is another bug while we're playing with $@/$*.
    When IFS is set to a non-whitespace character such as :, $*
    outside quotes won't remove empty fields as it should.

    This patch fixes both problems.

    Reported-by: Martijn Dekker &lt;martijn@inlv.org&gt;
    Suggested-by: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
argstr                                              1111    1113      +2
evalvar                                              571     569      -2
varvalue                                             579     576      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-5)               Total: -3 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: eval: Variable assignments on functions are no longer persistent</title>
<updated>2018-08-05T09:14:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T08:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=9abf53beb48b40e98d50fd35f445d6474af3a494'/>
<id>urn:sha1:9abf53beb48b40e98d50fd35f445d6474af3a494</id>
<content type='text'>
Upstream commit:

    Date: Wed, 4 Apr 2018 17:54:01 +0800
    eval: Variable assignments on functions are no longer persistent

    Dirk Fieldhouse &lt;fieldhouse@gmx.net&gt; wrote:
    &gt; In POSIX.1-2017 ("simultaneously IEEE Std 1003.1™-2017 and The Open
    &gt; Group Technical Standard Base Specifications, Issue 7")
    &gt; &lt;http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09&gt;,
    &gt; we read under '2.9.1 Simple Commands'
    &gt;
    &gt; "Variable assignments shall be performed as follows:
    &gt; ...
    &gt; -    If the command name is a standard utility implemented as a function
    &gt; (see XBD Utility), the effect of variable assignments shall be as if the
    &gt; utility was not implemented as a function.
    &gt; ...
    &gt; -    If the command name is a function that is not a standard utility
    &gt; implemented as a function, variable assignments shall affect the current
    &gt; execution environment during the execution of the function. It is
    &gt; unspecified:
    &gt;
    &gt;     *   Whether or not the variable assignments persist after the
    &gt; completion of the function
    &gt;
    &gt;     *   Whether or not the variables gain the export attribute during
    &gt; the execution of the function
    &gt;
    &gt;     *   Whether or not export attributes gained as a result of the
    &gt; variable assignments persist after the completion of the function (if
    &gt; variable assignments persist after the completion of the function)"

    POSIX used to require the current dash behaviour.  However, you're
    right that this is no longer the case.

    This patch will remove the persistence of the variable assignment.

    I have considered the exporting the variables during the function
    execution but have decided against it because:

    1) It makes the code bigger.
    2) dash has never done this in the past.
    3) You cannot use this portably anyway.

    Reported-by: Dirk Fieldhouse &lt;fieldhouse@gmx.net&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

function                                             old     new   delta
evalcommand                                         1606    1635     +29
evalcase                                             313     317      +4
evalfun                                              280     268     -12
pushlocalvars                                         48       -     -48
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/1 up/down: 33/-60)            Total: -27 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash,hush: properly handle ${v//pattern/repl} if pattern starts with /</title>
<updated>2018-08-04T20:25:28+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-04T20:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=c2aa218f23a4e952746ebef7bb86668c6255471c'/>
<id>urn:sha1:c2aa218f23a4e952746ebef7bb86668c6255471c</id>
<content type='text'>
Closes 2695

function                                             old     new   delta
parse_dollar                                         762     790     +28
subevalvar                                          1258    1267      +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 37/0)               Total: 37 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: IFS fixes</title>
<updated>2018-04-11T14:02:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-11T14:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=9678636911b39a7adf9b51d5b625cf4dc7e4ac81'/>
<id>urn:sha1:9678636911b39a7adf9b51d5b625cf4dc7e4ac81</id>
<content type='text'>
$ IFS=": "; x=" "; set x $x; for v; do echo "|$v|"; done
|x|
$ IFS=": "; x=":"; set x $x; for v; do echo "|$v|"; done
|x|
||

function                                             old     new   delta
run_pipe                                            1789    1870     +81
expand_on_ifs                                        310     361     +51
pseudo_exec_argv                                     588     591      +3
builtin_local                                         50      53      +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 138/0)             Total: 138 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: parser: Allow newlines within parameter substitution</title>
<updated>2018-04-11T10:39:18+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-11T10:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=680c3016a2dddc3edb4d79868a728e899638e2c4'/>
<id>urn:sha1:680c3016a2dddc3edb4d79868a728e899638e2c4</id>
<content type='text'>
Upstream commit:

Date: Thu, 22 Mar 2018 21:41:24 +0800
parser: Allow newlines within parameter substitution

    On Fri, Mar 16, 2018 at 11:27:22AM +0800, Herbert Xu wrote:
    &gt; On Thu, Mar 15, 2018 at 10:49:15PM +0100, Harald van Dijk wrote:
    &gt; &gt;
    &gt; &gt; Okay, it can be trivially modified to something that does work in other
    &gt; &gt; shells (even if it were actually executed), but gets rejected at parse time
    &gt; &gt; by dash:
    &gt; &gt;
    &gt; &gt;   if false; then
    &gt; &gt;     : ${$+
    &gt; &gt;   }
    &gt; &gt;   fi
    &gt;
    &gt; That's just a bug in dash's parser with ${} in general, because
    &gt; it bombs out without the if clause too:
    &gt;
    &gt; 	: ${$+
    &gt; 	}

    This patch fixes the parsing of newlines with parameter substitution.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
