summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-01 08:51:41 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-01 08:51:41 -0700
commit3fbba9970820512b6be02d73a90a2e579376e296 (patch)
treea2b4b0a9d169354d0b5ec9676271c7086c903a2b
parente88c73abd34c44e6b7ca897dfa2d1fc6be320f1f (diff)
downloadportage-3fbba9970820512b6be02d73a90a2e579376e296.tar.gz
portage-3fbba9970820512b6be02d73a90a2e579376e296.tar.bz2
portage-3fbba9970820512b6be02d73a90a2e579376e296.zip
Add a note to the ensure_dirs() docstring about atomic directory creation.
-rw-r--r--pym/portage/util/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index aa37e8c3c..ff6302e60 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -1045,7 +1045,12 @@ def write_atomic(file_path, content, **kwargs):
def ensure_dirs(dir_path, **kwargs):
"""Create a directory and call apply_permissions.
Returns True if a directory is created or the permissions needed to be
- modified, and False otherwise."""
+ modified, and False otherwise.
+
+ This function's handling of EEXIST errors makes it useful for atomic
+ directory creation, in which multiple processes may be competing to
+ create the same directory.
+ """
created_dir = False