From: Zac Medico Date: Tue, 6 Jun 2006 04:10:33 +0000 (-0000) Subject: Fix getgccversion() logic so that it works properly with eselect compiler for bug... X-Git-Tag: v2.1~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3;p=portage.git Fix getgccversion() logic so that it works properly with eselect compiler for bug #108393. Thanks to eradicator for help with this patch. svn path=/main/trunk/; revision=3463 --- diff --git a/bin/emerge b/bin/emerge index 40f1ae56b..0eae18a67 100755 --- a/bin/emerge +++ b/bin/emerge @@ -535,11 +535,13 @@ def getgccversion(): "!!! other terminals also.\n" ) - mystatus, myoutput = commands.getstatusoutput("gcc-config -c") - if mystatus == os.EX_OK and len(myoutput.split("-")) > 0: - return gcc_ver_prefix + myoutput.split("-")[-1] - 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 + + mystatus, myoutput = commands.getstatusoutput("gcc-config -c") if mystatus == os.EX_OK and len(myoutput.split("-")) > 0: return gcc_ver_prefix + myoutput.split("-")[-1]