summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-06 04:10:33 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-06 04:10:33 +0000
commit836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3 (patch)
treeb712eb798a3013b4fcf7a85531b5d4d9ab2354eb
parent2e445e41b5405f23d3060cfc76972d45ad1e8916 (diff)
downloadportage-836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3.tar.gz
portage-836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3.tar.bz2
portage-836b3c9b87ac2ff16a0d5136a03d3a506f2aaad3.zip
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
-rwxr-xr-xbin/emerge10
1 files 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]