diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-04 03:47:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-04 03:47:56 +0000 |
commit | cc04625c811f511c3fcba7eeaab2f246968b9fc3 (patch) | |
tree | 6ee368f480faae404d822cb539d3781257ef6cc5 /bin/repoman | |
parent | c842854cdb99e16af33378d7bbb2318c1997d381 (diff) | |
download | portage-cc04625c811f511c3fcba7eeaab2f246968b9fc3.tar.gz portage-cc04625c811f511c3fcba7eeaab2f246968b9fc3.tar.bz2 portage-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/repoman')
-rwxr-xr-x | bin/repoman | 7 |
1 files changed, 6 insertions, 1 deletions
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" |