Index: trunk/essentials/sys-apps/portage/pym/portage.py
===================================================================
--- trunk/essentials/sys-apps/portage/pym/portage.py	(revision 3451)
+++ trunk/essentials/sys-apps/portage/pym/portage.py	(revision 3452)
@@ -72,5 +72,5 @@
 	  DEPRECATED_PROFILE_FILE, USER_VIRTUALS_FILE, EBUILD_SH_ENV_FILE, \
 	  INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, CONFIG_MEMORY_FILE,\
-	  INCREMENTALS, EAPI, MISC_SH_BINARY
+	  INCREMENTALS, EAPI, MISC_SH_BINARY, ROOT_PATH
 
 	from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
@@ -1003,8 +1003,5 @@
 
 			if config_root is None:
-				if sys.platform == "os2knix":
-					config_root = "/@unixroot/"
-				else:
-					config_root = "/"
+				config_root = ROOT_PATH
 
 			config_root = normalize_path(os.path.abspath(
@@ -1256,8 +1253,5 @@
 
 			if target_root is None:
-				if sys.platform == "os2knix":
-					target_root = "/@unixroot/"
-				else:
-					target_root = "/"
+				target_root = ROOT_PATH
 
 			target_root = normalize_path(os.path.abspath(
@@ -4009,5 +4003,5 @@
 	return newsplit
 
-def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
+def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot=ROOT_PATH,
 	trees=None, **kwargs):
 	"""Recursively expand new-style virtuals so as to collapse one or more
@@ -4305,5 +4299,5 @@
 
 def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None,
-	use_cache=1, use_binaries=0, myroot="/", trees=None):
+	use_cache=1, use_binaries=0, myroot=ROOT_PATH, trees=None):
 	"""Takes a depend string and parses the condition."""
 	edebug = mysettings.get("PORTAGE_DEBUG", None) == "1"
@@ -4689,5 +4683,5 @@
 
 class portagetree:
-	def __init__(self, root="/", virtual=None, clone=None, settings=None):
+	def __init__(self, root=ROOT_PATH, virtual=None, clone=None, settings=None):
 
 		if clone:
@@ -5472,5 +5466,5 @@
 class vartree(object):
 	"this tree will scan a var/db/pkg database located at root (passed to init)"
-	def __init__(self, root="/", virtual=None, clone=None, categories=None,
+	def __init__(self, root=ROOT_PATH, virtual=None, clone=None, categories=None,
 		settings=None):
 		if clone:
@@ -8154,10 +8148,10 @@
 					writemsg("%s\n" % msg, noiselevel=-1)
 
-		update_config_files("/",
+		update_config_files(ROOT_PATH,
 			mysettings.get("CONFIG_PROTECT","").split(),
 			mysettings.get("CONFIG_PROTECT_MASK","").split(),
 			myupd)
 
-		trees["/"]["bintree"] = binarytree("/", mysettings["PKGDIR"],
+		trees["/"]["bintree"] = binarytree(ROOT_PATH, mysettings["PKGDIR"],
 			settings=mysettings)
 		for update_cmd in myupd:
@@ -8313,5 +8307,5 @@
 	kwargs = {}
 	for k, envvar in (("config_root", "PORTAGE_CONFIGROOT"), ("target_root", "ROOT")):
-		kwargs[k] = os.environ.get(envvar, "/")
+		kwargs[k] = os.environ.get(envvar, ROOT_PATH)
 
 	db = create_trees(**kwargs)
Index: trunk/essentials/sys-apps/portage/pym/portage_const.py
===================================================================
--- trunk/essentials/sys-apps/portage/pym/portage_const.py	(revision 3451)
+++ trunk/essentials/sys-apps/portage/pym/portage_const.py	(revision 3452)
@@ -10,13 +10,17 @@
 
 import os
-# Some of the constants starting with '/' aren't prefixed 
-# by anything else and needs to be corrected on os2knix.
+
+# bird: ROOT_PATH ends with a trailing slash.
+#       EXE_SUFF is .exe on OS/2 and NT systems.
 import sys
+ROOT_PATH               = "/"
+EXE_SUFF                = ""
+if sys.platform == "os2knix" or sys.platform == "ntknix":
+	ROOT_PATH           = "/@unixroot/"
+	EXE_SUFF            = ".exe"
 
 VDB_PATH                = "var/db/pkg"
 PRIVATE_PATH            = "var/lib/portage"
-CACHE_PATH              = "/var/cache/edb"
-if sys.platform == "os2knix":
-	CACHE_PATH          = "/@unixroot" + CACHE_PATH
+CACHE_PATH              = ROOT_PATH+"var/cache/edb"
 DEPCACHE_PATH           = CACHE_PATH+"/dep"
 
@@ -34,8 +38,8 @@
 EBUILD_SH_BINARY        = PORTAGE_BIN_PATH+"/ebuild.sh"
 MISC_SH_BINARY          = PORTAGE_BIN_PATH + "/misc-functions.sh"
-SANDBOX_BINARY          = "/usr/bin/sandbox"
-BASH_BINARY             = "/bin/bash"
-MOVE_BINARY             = "/bin/mv"
-PRELINK_BINARY          = "/usr/sbin/prelink"
+SANDBOX_BINARY          = ROOT_PATH+"usr/bin/sandbox"+EXE_SUFF
+BASH_BINARY             = ROOT_PATH+"bin/bash"+EXE_SUFF
+MOVE_BINARY             = ROOT_PATH+"bin/mv"+EXE_SUFF
+PRELINK_BINARY          = ROOT_PATH+"usr/sbin/prelink"+EXE_SUFF
 
 WORLD_FILE              = PRIVATE_PATH + "/world"
@@ -45,5 +49,5 @@
 USER_VIRTUALS_FILE      = USER_CONFIG_PATH+"/virtuals"
 EBUILD_SH_ENV_FILE      = USER_CONFIG_PATH+"/bashrc"
-INVALID_ENV_FILE        = "/etc/spork/is/not/valid/profile.env"
+INVALID_ENV_FILE        = ROOT_PATH+"etc/spork/is/not/valid/profile.env"
 CUSTOM_MIRRORS_FILE     = USER_CONFIG_PATH+"/mirrors"
 CONFIG_MEMORY_FILE      = PRIVATE_PATH + "/config"
@@ -63,11 +67,4 @@
 MANIFEST2_IDENTIFIERS = ["AUX","MISC","DIST","EBUILD"]
 
-if sys.platform == "os2knix":
-	SANDBOX_BINARY      = "/@unixroot" + SANDBOX_BINARY
-	BASH_BINARY         = "/@unixroot" + BASH_BINARY
-	MOVE_BINARY         = "/@unixroot" + MOVE_BINARY
-	PRELINK_BINARY      = "/@unixroot" + PRELINK_BINARY
-	INVALID_ENV_FILE    = "/@unixroot" + INVALID_ENV_FILE
-
 # ===========================================================================
 # END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANT
