projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8c3ee5
)
Make dblink.delete() remove empty parent category directories. (trunk r14754)
author
Zac Medico
<zmedico@gentoo.org>
Sat, 31 Oct 2009 19:44:04 +0000
(19:44 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 31 Oct 2009 19:44:04 +0000
(19:44 -0000)
svn path=/main/branches/2.1.7/; revision=14758
pym/portage/dbapi/vartree.py
patch
|
blob
|
history
diff --git
a/pym/portage/dbapi/vartree.py
b/pym/portage/dbapi/vartree.py
index 4284eff9b050ceffa5107f0dc981d039bc320a76..aae16e43ff7622432505515f972c454825edd9f9 100644
(file)
--- a/
pym/portage/dbapi/vartree.py
+++ b/
pym/portage/dbapi/vartree.py
@@
-1230,6
+1230,11
@@
class dblink(object):
return
shutil.rmtree(self.dbdir)
+ # If empty, remove parent category directory.
+ try:
+ os.rmdir(os.path.dirname(self.dbdir))
+ except OSError:
+ pass
self.vartree.dbapi._remove(self)
def clearcontents(self):