diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-31 23:00:53 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-31 23:00:53 -0700 |
commit | 4dbb985f80ca6c175975579e7e5073e500f350a8 (patch) | |
tree | 1b8c5a0fc45e2740754175892e9e6bdb937e0588 | |
parent | 31cdef0abb5e060e8dff1458f2fae4d765041fb7 (diff) | |
download | portage-4dbb985f80ca6c175975579e7e5073e500f350a8.tar.gz portage-4dbb985f80ca6c175975579e7e5073e500f350a8.tar.bz2 portage-4dbb985f80ca6c175975579e7e5073e500f350a8.zip |
In dblink.mergeme(), handle EISDIR which can be raised from mkdir calls
on FreeBSD (see bug #187518).
-rw-r--r-- | pym/portage/dbapi/vartree.py | 6 | ||||
-rw-r--r-- | pym/portage/util/__init__.py | 1 |
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): |