From 135a5b02f8afc22ebc4af388cd9617afaec1cb86 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 5 Apr 2007 16:19:46 +0000 Subject: [PATCH] Get rid of userland madness. The default userland is "GNU", and only BSD-ish things in non-prefix have a userland "BSD". svn path=/main/branches/prefix/; revision=6336 --- pym/portage/data.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pym/portage/data.py b/pym/portage/data.py index de1683295..4c8836cca 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -7,7 +7,7 @@ if not hasattr(__builtins__, "set"): from sets import Set as set import os, sys, pwd, grp -from portage.const import wheelgid, rootuid, portageuser, portagegroup +from portage.const import wheelgid, rootuid, portageuser, portagegroup, EPREFIX from portage.util import writemsg from portage.output import green,red from portage.output import create_color_func @@ -17,22 +17,16 @@ ostype=os.uname()[0] lchown = None os.environ["XARGS"]="xargs -r" -if ostype=="Linux" or ostype.lower().endswith("gnu"): - userland="GNU" -elif ostype == "Darwin": - userland="Darwin" +# default userland is GNU ... +userland="GNU" +# ... but BSD in non-prefix has BSD userland +if EPREFIX == "" and (ostype.endswith("BSD") or ostype =="DragonFly"): + userland="BSD" + +# "fix" for lchown on Darwin +if ostype == "Darwin": def lchown(*pos_args, **key_args): pass -elif ostype == "SunOS": - userland="Solaris" - -elif ostype.endswith("BSD") or ostype =="DragonFly": - userland="BSD" -elif ostype in ["AIX"]: - userland="AIX" -else: - writemsg(red("Operating system")+" \""+ostype+"\" "+red("currently unsupported. Exiting.")+"\n") - sys.exit(1) if not lchown: if "lchown" in dir(os): -- 2.26.2