diff options
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r-- | pym/portage/dbapi/vartree.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 23676c91b..165e04f1e 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -551,7 +551,13 @@ class vardbapi(dbapi): if not mylink.exists(): raise KeyError(cpv) for k, v in values.iteritems(): - mylink.setfile(k, v) + if v: + mylink.setfile(k, v) + else: + try: + os.unlink(os.path.join(self.getpath(cpv), k)) + except EnvironmentError: + pass def counter_tick(self, myroot, mycpv=None): return self.counter_tick_core(myroot, incrementing=1, mycpv=mycpv) |