From: Zac Medico Date: Mon, 31 Jul 2006 15:26:56 +0000 (-0000) Subject: Fix getgccversion logic for bug #137786 and bug #139662. This patch is from trunk... X-Git-Tag: v2.1-r2~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=516532c47c83c98c836788a308c3ac898c09c2cd;p=portage.git Fix getgccversion logic for bug #137786 and bug #139662. This patch is from trunk r3632. svn path=/main/branches/2.1/; revision=4056 --- diff --git a/bin/emerge b/bin/emerge index da71d647f..b7d33e4a3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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: