From: Zac Medico Date: Sun, 22 Oct 2006 10:38:16 +0000 (-0000) Subject: Fix gcc version parsing once again for bug #137786. sigh. :) X-Git-Tag: v2.1.2~570 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=82a1dd179f7c235eca2a53ffcf60b23e3073217b;p=portage.git Fix gcc version parsing once again for bug #137786. sigh. :) svn path=/main/trunk/; revision=4794 --- diff --git a/bin/emerge b/bin/emerge index 86a26b7f2..72ba71ef3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -297,8 +297,8 @@ def getgccversion(chost): return myoutput.replace(chost + "-", gcc_ver_prefix, 1) mystatus, myoutput = commands.getstatusoutput("gcc-config -c") - if mystatus == os.EX_OK and len(myoutput.split("-")) > 0: - return gcc_ver_prefix + myoutput.split("-")[-1] + if mystatus == os.EX_OK and myoutput.startswith(chost + "-"): + return myoutput.replace(chost + "-", gcc_ver_prefix, 1) mystatus, myoutput = commands.getstatusoutput( chost + "-" + gcc_ver_command)