Summary: | app-admin/eselect-1.4.1: "eselect profile list" breaks with app-shells/bash-4.3_p18 | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Albert W. Hopkins <marduk> |
Component: | eselect | Assignee: | Gentoo eselect Team <eselect> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | audvare, base-system |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://lists.gnu.org/archive/html/bug-bash/2014-08/msg00053.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Albert W. Hopkins
2014-05-23 18:16:01 UTC
Looks like expansion of arrays has subtly changed in bash 4.3. In bash-4.2_p47: $ foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? 0 In bash-4.3_p18: $ foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? 1 $ IFS=""; [[ -z ${foo[@]#0} ]]; echo $? 0 Not sure if this is a bug in bash. Documentation says that word splitting is not performed between [[ ]]. Also there are no double quotes, therefore the IFS setting should not have any influence? CCing bash maintainers. Please test if this patch fixes the problem: <http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=blobdiff;f=modules/profile.eselect;h=94aed2b25ccd992555c5ae5ba2e74ac18b8af02c;hp=3bd5408d2e817842dc116e805bb3c0c21de6bb05;hb=4c3a9faded0b5cdce7bac51069759ae23dfa859f;hpb=52fc546e3590d79921420705bd1771298656fa65> (In reply to Ulrich Müller from comment #1) > Not sure if this is a bug in bash. Documentation says that word splitting is > not performed between [[ ]]. Also there are no double quotes, therefore the > IFS setting should not have any influence? It's a fallout of this recent change (bash43-014): http://lists.gnu.org/archive/html/help-bash/2014-04/msg00005.html (In reply to Ulrich Müller from comment #2) > Please test if this patch fixes the problem: > <http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=blobdiff; > f=modules/profile.eselect;h=94aed2b25ccd992555c5ae5ba2e74ac18b8af02c; > hp=3bd5408d2e817842dc116e805bb3c0c21de6bb05; > hb=4c3a9faded0b5cdce7bac51069759ae23dfa859f; > hpb=52fc546e3590d79921420705bd1771298656fa65> That patch fixes the bug. Fixed in eselect-1.4.2. Thanks for reporting. Leaving this bug open because it could be an issue in bash 4.3 also. I'm using app-shells/bash-4.3_p18-r2, app-admin/eselect-1.4.2 and this does not appear to be an issue any longer. Thanks. (In reply to Ulrich Müller from comment #1) > Looks like expansion of arrays has subtly changed in bash 4.3. > > In bash-4.2_p47: > $ foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? > 0 > > In bash-4.3_p18: > $ foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? > 1 > $ IFS=""; [[ -z ${foo[@]#0} ]]; echo $? > 0 > > Not sure if this is a bug in bash. Documentation says that word splitting is > not performed between [[ ]]. Also there are no double quotes, therefore the > IFS setting should not have any influence? @base-system: Do you think this is a bug in bash (or its documentation)? If not, this bug can be closed. i thought i had posted this upstream, but i guess not upstream has confirmed the new behavior is intentional *** Bug 529290 has been marked as a duplicate of this bug. *** |