summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py6
-rw-r--r--pym/portage/util/__init__.py1
2 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 4a95567b9..45ed955ed 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3619,7 +3619,8 @@ class dblink(object):
else:
os.mkdir(mydest)
except OSError as e:
- if e.errno != errno.EEXIST:
+ if e.errno not in (errno.EEXIST, errno.EISDIR):
+ # Bug 187518 - sometimes mkdir raises EISDIR on FreeBSD
raise
del e
@@ -3636,7 +3637,8 @@ class dblink(object):
else:
os.mkdir(mydest)
except OSError as e:
- if e.errno != errno.EEXIST:
+ if e.errno not in (errno.EEXIST, errno.EISDIR):
+ # Bug 187518 - sometimes mkdir raises EISDIR on FreeBSD
raise
del e
os.chmod(mydest, mystat[0])
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index 98ad7c205..2c22949a4 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -1055,6 +1055,7 @@ def ensure_dirs(dir_path, *args, **kwargs):
except OSError as oe:
func_call = "makedirs('%s')" % dir_path
if oe.errno in (errno.EEXIST, errno.EISDIR):
+ # Bug 187518 - sometimes mkdir raises EISDIR on FreeBSD
pass
else:
if os.path.isdir(dir_path):