From cc04625c811f511c3fcba7eeaab2f246968b9fc3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 4 Jun 2008 03:47:56 +0000 Subject: Use "platform" module instead of os.uname, or -- even worse -- a system call to uname. Change repoman's identification string not to use "processor" on Linux (where it is huge), Interix (where it doesn't exist) and AIX/HP-UX (where it prints "unknown"), but "machine" instead. (branches/prefix r10554) svn path=/main/trunk/; revision=10574 --- bin/repoman | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/repoman') diff --git a/bin/repoman b/bin/repoman index 7f381da94..cf8047eaf 100755 --- a/bin/repoman +++ b/bin/repoman @@ -20,6 +20,7 @@ import stat import sys import tempfile import time +import platform from itertools import izip from stat import S_ISDIR, ST_CTIME @@ -1754,7 +1755,11 @@ else: sys.stderr.write("Failed to insert portage version in message!\n") sys.stderr.flush() portage_version = "Unknown" - unameout = commands.getstatusoutput("uname -srp")[1] + unameout = platform.system() + " " + platform.release() + " " + if platform.system() in ["Darwin", "SunOS"]: + unameout += platform.processor() + else: + unameout += platform.machine() commitmessage+="\n(Portage version: "+str(portage_version)+"/"+vcs+"/"+unameout if options.force: commitmessage += ", RepoMan options: --force" -- cgit v1.2.3-1-g7c22