import sys
import tempfile
import time
+import platform
from itertools import izip
from stat import S_ISDIR, ST_CTIME
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"
from random import shuffle
import UserDict
from itertools import chain, izip
+ import platform
except ImportError, e:
sys.stderr.write("\n\n")
sys.stderr.write("!!! Failed to complete python imports. These are internal modules for\n")
raise
bsd_chflags = None
-if os.uname()[0] in ["FreeBSD"]:
+if platform.system() in ["FreeBSD"]:
def bsd_chflags():
pass
def _chflags(path, flags, opts=""):
# Distributed under the terms of the GNU General Public License v2
# $Id$
-import os, sys, pwd, grp
+import os, sys, pwd, grp, platform
from portage.util import writemsg
from portage.output import green,red
from portage.output import create_color_func
bad = create_color_func("BAD")
-ostype=os.uname()[0]
+ostype=platform.system()
userland = None
if ostype == "DragonFly" or ostype.endswith("BSD"):
userland = "BSD"