diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-11-28 08:27:28 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-11-28 08:27:28 +0000 |
commit | affbd5a9bcaee4d9f9d67475a72e344ba5c61106 (patch) | |
tree | 7fe7581c9403f4c257b8de2d7d560a8f07870007 | |
parent | c8e9acee36bde7f1044466d40546cd748701a2a4 (diff) | |
download | portage-affbd5a9bcaee4d9f9d67475a72e344ba5c61106.tar.gz portage-affbd5a9bcaee4d9f9d67475a72e344ba5c61106.tar.bz2 portage-affbd5a9bcaee4d9f9d67475a72e344ba5c61106.zip |
In chk_updated_cfg_files(), avoid scanning for config files for
paths that aren't writable by the current user. This prevents
Permission denied errors from being triggered later when trying
to scan subdirectories that are inaccessible.
svn path=/main/trunk/; revision=8726
-rw-r--r-- | pym/_emerge/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 0a4c0027c..af0ecd323 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5051,6 +5051,10 @@ def chk_updated_cfg_files(target_root, config_protect): procount=0 for x in config_protect: x = os.path.join(target_root, x.lstrip(os.path.sep)) + if not os.access(x, os.W_OK): + # Avoid Permission denied errors generated + # later by `find`. + continue try: mymode = os.lstat(x).st_mode except OSError: |