Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#42143 - [bash] Cannot import function

Attached to Project: Arch Linux
Opened by alfred nenesse (nenesse) - Saturday, 27 September 2014, 12:58 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 29 September 2014, 17:23 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Felix Yan (felixonmars)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Problem with set -a bash option and chroot

LANG=C ./test_chroot
bash: BASH_FUNC_c_chroot(): line 0: syntax error near unexpected token `)'
bash: BASH_FUNC_c_chroot(): line 0: `BASH_FUNC_c_chroot() () { mount -o bind {,$xx_install_path}/proc;'
bash: error importing function definition for `BASH_FUNC_c_chroot'
[root@asus4570 /]#

it working properly last weekend.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 29 September 2014, 17:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.3.027-1
Comment by Doug Newgard (Scimmia) - Saturday, 27 September 2014, 13:26 GMT
chroot has nothing to do with this, it's simply bash not letting you import a function.
Comment by Jan de Groot (JGC) - Saturday, 27 September 2014, 16:45 GMT
The space between function name and () is probably your problem.
Comment by Dave Reisner (falconindy) - Saturday, 27 September 2014, 16:48 GMT
Exporting the function doesn't make sense here. Is this the real use case? You could get rid of 'set -a' and this will continue to work as is...
Comment by alfred nenesse (nenesse) - Sunday, 28 September 2014, 20:03 GMT
@Dave Reisner
it's not for export function, it's for variables. I removed all the superfluous code for testing.

@Jan de Groot
I try whitout space between function_name(){, it's the same.
I try function myfunc {, the same


Comment by alfred nenesse (nenesse) - Monday, 29 September 2014, 17:21 GMT
fixed in version 4.3.027-1

Loading...