entropy.client.interfaces.package: fix issues with properly handling CONFIG_PROTECT_MASK

This commit is contained in:
Fabio Erculiani
2009-05-17 19:51:12 +02:00
parent 95a3574cc2
commit 4b86d2eb16

View File

@@ -1371,6 +1371,16 @@ class Package:
elif os.path.dirname(tofile) in newmask:
protected = False
in_mask = False
else:
tofile_testdir = os.path.dirname(tofile)
old_tofile_testdir = None
while tofile_testdir != old_tofile_testdir:
if tofile_testdir in newmask:
protected = False
in_mask = False
break
old_tofile_testdir = tofile_testdir
tofile_testdir = os.path.dirname(tofile_testdir)
if not os.path.lexists(tofile):
protected = False # file doesn't exist