From 836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 6 Jun 2006 04:10:33 +0000 Subject: [PATCH] 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 --- bin/emerge | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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] -- 2.26.2