From: Zac Medico Date: Fri, 26 Oct 2012 17:45:54 +0000 (-0700) Subject: emerge --info: show linker version, bug #436294 X-Git-Tag: v2.2.0_alpha142 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4126fcfb04efcedaf857b0f6977effb82c24e1cb;p=portage.git emerge --info: show linker version, bug #436294 --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index fec2dfa55..2b3e57e62 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1361,6 +1361,7 @@ def action_info(settings, trees, myopts, myfiles): append = output_buffer.append root_config = trees[settings['EROOT']]['root_config'] running_eroot = trees._running_eroot + chost = settings.get("CHOST") append(getportageversion(settings["PORTDIR"], None, settings.profile_path, settings["CHOST"], @@ -1382,6 +1383,23 @@ def action_info(settings, trees, myopts, myfiles): lastSync = "Unknown" append("Timestamp of tree: %s" % (lastSync,)) + ld_names = [] + if chost: + ld_names.append(chost + "-ld") + ld_names.append("ld") + for name in ld_names: + try: + proc = subprocess.Popen([name, "--version"], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + except OSError: + pass + else: + output = _unicode_decode(proc.communicate()[0]).splitlines() + proc.wait() + if proc.wait() == os.EX_OK and output: + append("ld %s" % (output[0])) + break + try: proc = subprocess.Popen(["distcc", "--version"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)