Fix getgccversion logic for bug #137786 and bug #139662. This patch is from trunk...
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:26:56 +0000 (15:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:26:56 +0000 (15:26 -0000)
svn path=/main/branches/2.1/; revision=4056

bin/emerge

index da71d647fa48fbca9da2f7d2ba36efd4e2cc9be7..b7d33e4a3ab99f59d7d1f71e3d44d8edacd28274 100755 (executable)
@@ -538,8 +538,8 @@ def getgccversion():
        mystatus, myoutput = commands.getstatusoutput("eselect compiler show")
        if mystatus == os.EX_OK and len(myoutput.split("/")) == 2:
                part1, part2 = myoutput.split("/")
-               if len(part1.split("-")) > 0:
-                       return gcc_ver_prefix + part1.split("-")[-1] + "/" + part2
+               if part1.startswith(portage.settings["CHOST"] + "-"):
+                       return myoutput.replace(portage.settings["CHOST"] + "-", gcc_ver_prefix, 1)
 
        mystatus, myoutput = commands.getstatusoutput("gcc-config -c")
        if mystatus == os.EX_OK and len(myoutput.split("-")) > 0: