summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 400eab8b4..4284eff9b 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -144,8 +144,11 @@ class vardbapi(dbapi):
catdir = base + _os.sep + cat
t = time.time()
t = (t, t)
- for x in (catdir, base):
- os.utime(x, t)
+ try:
+ for x in (catdir, base):
+ os.utime(x, t)
+ except OSError:
+ os.makedirs(catdir)
def cpv_exists(self, mykey):
"Tells us whether an actual ebuild exists on disk (no masking)"