After an upgrade to bash4, emerge reports prerm/postrm failures. On a few ebuilds, an error is reported in environment file, regarding an syntaxic error in tc-is-softfloat function. Reproducible: Always Steps to Reproduce: 1. unmask bash-4/readline-6 2. emerge bash 3. emerge <some package> Actual Results: after merging successfully : portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment: line 2737: syntax error near unexpected token `;;' /portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment: line 2737: ` ;;' * * ERROR: dev-lang/tcl-8.4.19 failed. * Call stack: * ebuild.sh, line 1827: Called die * The specific snippet of code: * die "error processing environment" * The die message: * error processing environment * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/build.log'. * The ebuild environment file is located at '/portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment'. * /portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment: line 2737: syntax error near unexpected token `;;' /portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment: line 2737: ` ;;' * * ERROR: dev-lang/tcl-8.4.19 failed. * Call stack: * ebuild.sh, line 1827: Called die * The specific snippet of code: * die "error processing environment" * The die message: * error processing environment * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/build.log'. * The ebuild environment file is located at '/portage/tmp/binpkgs/dev-lang/tcl-8.4.19/temp/environment'. * * The 'postrm' phase of the 'dev-lang/tcl-8.4.19' package has failed with * exit value 1. * * The problem occurred while executing the ebuild file named * 'tcl-8.4.19.ebuild' located in the '/var/db/pkg/dev-lang/tcl-8.4.19' * directory. If necessary, manually remove the environment.bz2 file and/or * the ebuild file located in that directory. * * Removal of the environment.bz2 file is preferred since it may allow the * removal phases to execute successfully. The ebuild will be sourced and * the eclasses from the current portage tree will be used when necessary. * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm() * removal phases to be skipped entirely. Expected Results: after merging successfully : no errors The issue seems to be due to posix compliance being stricter in bash-4 : looking et posix shell spec : a && b || c should be replaced by : a && b || c
Created attachment 183363 [details, diff] tc-is-softfloat posix correctness
You know, bash-4.0 has no KEYWORDS for a reason. Anyway, please have a look at the header information of the currently installed bash-4.0 ebuild: grep Header /var/db/pkg/app-shells/bash-4.0/bash-4.0.ebuild and in case the string doesn't contain "v 1.12" (or possibly higher) please re-emerge bash-4.0 and try to reproduce the reported problem. In case the error is gone, please mark this bug as INVALID.
Err... in case the header isn't "v 1.12" (or possibly higher), re-sync your portage-tree and re-ermge bash-4.0 again...
Alright, I finally had time to emerge tcl-8.4.19 with bash-4.0 (ebuild revision 1.12) and I cannot reproduce your reported problem. I mark this bug as RESOLVED INVALID. Feel free to reopen this bug in case you still encounter this error. But please re-sync and re-emerge bash-4.0 beforehand.
Sorry to return late on this bug, i can only test at home (webrsync at work) So it's ok for this bug.