From: Zac Medico Date: Tue, 17 May 2011 19:43:48 +0000 (-0700) Subject: --autounmask-write: don't write hidden files X-Git-Tag: v2.2.0_alpha34~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8c1ef09c17168325e92483034767ef89c696e2d3;p=portage.git --autounmask-write: don't write hidden files --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index a2b953448..609b4d580 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -34,6 +34,7 @@ from portage.util import ConfigProtect, shlex_split, new_protect_filename from portage.util import cmp_sort_key, writemsg, writemsg_stdout from portage.util import writemsg_level, write_atomic from portage.util.digraph import digraph +from portage.util.listdir import _ignorecvs_dirs from portage.versions import catpkgsplit from _emerge.AtomArg import AtomArg @@ -5697,6 +5698,8 @@ class depgraph(object): if stat.S_ISREG(st.st_mode): last_file_path = p elif stat.S_ISDIR(st.st_mode): + if os.path.basename(p) in _ignorecvs_dirs: + continue try: contents = os.listdir(p) except OSError: @@ -5704,6 +5707,9 @@ class depgraph(object): else: contents.sort(reverse=True) for child in contents: + if child.startswith(".") or \ + child.endswith("~"): + continue stack.append(os.path.join(p, child)) return last_file_path