create unpack dir and work dir if not found

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1543 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-03-30 22:05:46 +00:00
parent 259b798d65
commit b20bdca7bb
+6 -4
View File
@@ -1087,14 +1087,16 @@ def const_createWorkingDirectories():
'''
w_gid = os.stat(etpConst['entropyworkdir'])[5]
if w_gid != gid:
if not os.path.isdir(etpConst['entropyworkdir']):
os.makedirs(etpConst['entropyworkdir'])
const_setup_perms(etpConst['entropyworkdir'],gid)
w_gid = os.stat(etpConst['entropyunpackdir'])[5]
if w_gid != gid:
if not os.path.isdir(etpConst['entropyunpackdir']):
os.makedirs(etpConst['entropyunpackdir'])
const_setup_perms(etpConst['entropyunpackdir'],gid)
try:
os.makedirs(etpConst['entropyunpackdir'])
except OSError:
pass
if os.path.isdir(etpConst['entropyunpackdir']):
const_setup_perms(etpConst['entropyunpackdir'],gid)
# always setup /var/lib/entropy/client permissions
const_setup_perms(etpConst['etpdatabaseclientdir'],gid)