if cfgfiledict.has_key("IGNORE"):
del cfgfiledict["IGNORE"]
- # XXXX: HACK! PathSpec is very necessary here.
- if not os.path.exists(destroot+PRIVATE_PATH):
- os.makedirs(destroot+PRIVATE_PATH)
- os.chown(destroot+PRIVATE_PATH,os.getuid(),portage_gid)
- os.chmod(destroot+PRIVATE_PATH,02770)
+ my_private_path = os.path.join(destroot, PRIVATE_PATH)
+ if not os.path.exists(my_private_path):
+ os.makedirs(my_private_path)
+ os.chown(my_private_path, os.getuid(), portage_gid)
+ os.chmod(my_private_path, 02770)
mylock = portage_locks.lockfile(destroot+CONFIG_MEMORY_FILE)
writedict(cfgfiledict,destroot+CONFIG_MEMORY_FILE)
def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
myfilename = filename[:]
- prelink_tmpfile = PRIVATE_PATH+"/prelink-checksum.tmp."+str(os.getpid())
+ prelink_tmpfile = os.path.join("/", PRIVATE_PATH, "prelink-checksum.tmp." + str(os.getpid()))
mylock = None
if calc_prelink and prelink_capable:
# ===========================================================================
VDB_PATH = "var/db/pkg"
-PRIVATE_PATH = "/var/lib/portage"
+PRIVATE_PATH = "var/lib/portage"
CACHE_PATH = "/var/cache/edb"
DEPCACHE_PATH = CACHE_PATH+"/dep"
MOVE_BINARY = "/bin/mv"
PRELINK_BINARY = "/usr/sbin/prelink"
-WORLD_FILE = PRIVATE_PATH+"/world"
+WORLD_FILE = "/" + PRIVATE_PATH + "/world"
MAKE_CONF_FILE = "/etc/make.conf"
MAKE_DEFAULTS_FILE = PROFILE_PATH + "/make.defaults"
DEPRECATED_PROFILE_FILE = PROFILE_PATH+"/deprecated"
EBUILD_SH_ENV_FILE = USER_CONFIG_PATH+"/bashrc"
INVALID_ENV_FILE = "/etc/spork/is/not/valid/profile.env"
CUSTOM_MIRRORS_FILE = USER_CONFIG_PATH+"/mirrors"
-CONFIG_MEMORY_FILE = PRIVATE_PATH + "/config"
+CONFIG_MEMORY_FILE = "/" + PRIVATE_PATH + "/config"
INCREMENTALS=["USE","USE_EXPAND","USE_EXPAND_HIDDEN","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"]
STICKIES=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EINSTALL","EXTRA_EMAKE"]