From: Zac Medico Date: Wed, 28 Nov 2007 08:28:20 +0000 (-0000) Subject: In chk_updated_cfg_files(), avoid scanning for config files for X-Git-Tag: v2.1.4~181 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6562f79a3620553ed3310084ae9860bfc484ef98;p=portage.git 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. (trunk r8726) svn path=/main/branches/2.1.2/; revision=8727 --- diff --git a/bin/emerge b/bin/emerge index 89dd81752..6c3bf2b18 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4572,6 +4572,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: