From 62705448fcd0b6b9ef793372dce2ceda0c3a3eb2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 5 Mar 2006 19:45:23 +0000 Subject: Remove the leading / from PRIVATE_PATH (var/lib/portage) for better cooperation with os.path.join (see bug #124471). svn path=/main/trunk/; revision=2815 --- pym/portage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pym/portage.py') diff --git a/pym/portage.py b/pym/portage.py index 10c793f27..e68a6d048 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6049,11 +6049,11 @@ class dblink: 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) -- cgit v1.2.3-1-g7c22