summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-04 03:50:44 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-04 03:50:44 +0000
commitdcb0e56b3ebaabccc44246f6a2ede2f880cc5527 (patch)
tree86711340312a13c0889f835a669dfd44adfc0486 /pym
parentcc04625c811f511c3fcba7eeaab2f246968b9fc3 (diff)
downloadportage-dcb0e56b3ebaabccc44246f6a2ede2f880cc5527.tar.gz
portage-dcb0e56b3ebaabccc44246f6a2ede2f880cc5527.tar.bz2
portage-dcb0e56b3ebaabccc44246f6a2ede2f880cc5527.zip
Use platform module to make it clear what we're displaying. Instead of
an 'uname -mrp' call use platform.platform() to describe the system in emerge --info. (branches/prefix r10555) svn path=/main/trunk/; revision=10575
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 73ba3e631..7fd1373ad 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -21,6 +21,7 @@ except KeyboardInterrupt:
sys.exit(1)
import os, stat
+import platform
os.environ["PORTAGE_LEGACY_GLOBALS"] = "false"
try:
@@ -65,7 +66,7 @@ except ImportError:
class stdout_spinner(object):
scroll_msgs = [
- "Gentoo Rocks ("+os.uname()[0]+")",
+ "Gentoo Rocks ("+platform.system()+")",
"Thank you for using Gentoo. :)",
"Are you actually trying to read this?",
"How many times have you stared at this?",
@@ -347,7 +348,7 @@ def getportageversion(portdir, target_root, profile, chost, vardb):
libcver="unavailable"
gccver = getgccversion(chost)
- unameout=os.uname()[2]+" "+os.uname()[4]
+ unameout=platform.release()+" "+platform.machine()
return "Portage " + portage.VERSION +" ("+profilever+", "+gccver+", "+libcver+", "+unameout+")"
@@ -7642,7 +7643,6 @@ def action_config(settings, trees, myopts, myfiles):
print
def action_info(settings, trees, myopts, myfiles):
- unameout=commands.getstatusoutput("uname -mrp")[1]
print getportageversion(settings["PORTDIR"], settings["ROOT"],
settings.profile_path, settings["CHOST"],
trees[settings["ROOT"]]["vartree"].dbapi)
@@ -7652,7 +7652,7 @@ def action_info(settings, trees, myopts, myfiles):
print header_width * "="
print header_title.rjust(int(header_width/2 + len(header_title)/2))
print header_width * "="
- print "System uname: "+unameout
+ print "System uname: "+platform.platform(aliased=1)
lastSync = portage.grabfile(os.path.join(
settings["PORTDIR"], "metadata", "timestamp.chk"))
@@ -9017,7 +9017,7 @@ def emerge_main():
if "moo" in myfiles:
print """
- Larry loves Gentoo (""" + os.uname()[0] + """)
+ Larry loves Gentoo (""" + platform.system() + """)
_______________________
< Have you mooed today? >