Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 260510

Summary: app-shells/bash-4.0 - emerge prerm/postrm failure
Product: Gentoo Linux Reporter: Frédéric Heulin <frederic.heulin>
Component: EclassesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: tc-is-softfloat posix correctness

Description Frédéric Heulin 2009-02-27 13:47:50 UTC
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
Comment 1 Frédéric Heulin 2009-02-27 13:49:12 UTC
Created attachment 183363 [details, diff]
tc-is-softfloat posix correctness
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-02-27 13:55:56 UTC
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.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-02-27 13:57:03 UTC
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...
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-02-27 17:18:30 UTC
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.
Comment 5 Frédéric Heulin 2009-02-28 19:24:36 UTC
Sorry to return late on this bug, i can only test at home (webrsync at work)
So it's ok for this bug.