From: Marius Mauch Date: Tue, 9 Oct 2007 18:55:33 +0000 (-0000) Subject: Exclude .metadata files in multi set configurations for StaticFileSet X-Git-Tag: v2.2_pre1~671 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1b09c5ce53335bb79f2bccd5ae4a1ff090853ff;p=portage.git Exclude .metadata files in multi set configurations for StaticFileSet svn path=/main/trunk/; revision=8021 --- diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py index 9cf90600a..c13c37252 100644 --- a/pym/portage/sets/__init__.py +++ b/pym/portage/sets/__init__.py @@ -179,6 +179,7 @@ class SetConfig(SafeConfigParser): self.trees = trees self.settings = settings self._parsed = False + def _parse(self): if self._parsed: return diff --git a/pym/portage/sets/files.py b/pym/portage/sets/files.py index c6656397e..d402a912e 100644 --- a/pym/portage/sets/files.py +++ b/pym/portage/sets/files.py @@ -80,6 +80,8 @@ class StaticFileSet(EditablePackageSet): raise SetConfigError("name_pattern doesn't include $name placeholder") if os.path.isdir(directory): for filename in os.listdir(directory): + if filename.endswith(".metadata"): + continue myname = name_pattern.replace("$name", filename) myname = myname.replace("${name}", filename) rValue[myname] = StaticFileSet(os.path.join(directory, filename))