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

Bug 159439

Summary: java.eclass and java-vm-2.eclass does not always match the correct arch
Product: Gentoo Linux Reporter: Matthew Schultz <mattsch>
Component: EclassesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Matthew Schultz 2006-12-29 19:31:42 UTC
This regex is too greedy: 

uname -m | sed -e s/[i]*.86/i386/ -e s/x86_64/amd64/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/

I would venture to guess that there isn't any arch called i386_64.  Did 64-bit even exist back then?  Anyway, that's what it outputs when using the amd64 arch. The regular expressions in those files should be changed to this:

uname -m | sed -e s/i[3-6]86/i386/ -e s/x86_64/amd64/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-04-27 23:09:09 UTC
The fallback uname call makes no sense to me, because $ARCH should be always fine as set by profiles, unless somebody overrides it with bogus in make.conf, in which case it should better die.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-04-28 08:53:13 UTC
(In reply to comment #1)
> The fallback uname call makes no sense to me, because $ARCH should be always
> fine as set by profiles, unless somebody overrides it with bogus in make.conf,
> in which case it should better die.
> 

Agreed.
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2007-04-28 08:53:39 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > The fallback uname call makes no sense to me, because $ARCH should be always
> > fine as set by profiles, unless somebody overrides it with bogus in make.conf,
> > in which case it should better die.
> > 
> 
> Agreed.
> 

Using uname also doesn't work in a cross compiling scenario.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-04-28 08:59:55 UTC
So it should just substitute x86 to i386 (that's how the dirs are named) and probably x86-fbsd -> i386?
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2007-05-07 21:47:08 UTC
(In reply to comment #4)
> So it should just substitute x86 to i386 (that's how the dirs are named) and
> probably x86-fbsd -> i386?
> 

Something like that yes.
Comment 6 James Le Cuirot gentoo-dev 2016-08-03 07:48:35 UTC
I've now rewritten the function so that it is ABI-aware and doesn't generally suck. :)