summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-04 03:47:56 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-04 03:47:56 +0000
commitcc04625c811f511c3fcba7eeaab2f246968b9fc3 (patch)
tree6ee368f480faae404d822cb539d3781257ef6cc5 /bin
parentFix typo. (diff)
downloadportage-multirepo-cc04625c811f511c3fcba7eeaab2f246968b9fc3.tar.gz
portage-multirepo-cc04625c811f511c3fcba7eeaab2f246968b9fc3.tar.bz2
portage-multirepo-cc04625c811f511c3fcba7eeaab2f246968b9fc3.zip
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index 7f381da9..cf8047ea 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"