Exclude .metadata files in multi set configurations for StaticFileSet
authorMarius Mauch <genone@gentoo.org>
Tue, 9 Oct 2007 18:55:33 +0000 (18:55 -0000)
committerMarius Mauch <genone@gentoo.org>
Tue, 9 Oct 2007 18:55:33 +0000 (18:55 -0000)
svn path=/main/trunk/; revision=8021

pym/portage/sets/__init__.py
pym/portage/sets/files.py

index 9cf90600a500802df87161279a323d8843fc02bf..c13c37252996d5ab23581c825c898fda31041359 100644 (file)
@@ -179,6 +179,7 @@ class SetConfig(SafeConfigParser):
                self.trees = trees
                self.settings = settings
                self._parsed = False
+
        def _parse(self):
                if self._parsed:
                        return
index c6656397eb87fb373d71305ed490523b227ad32a..d402a912e02291238a38c7913d83891c028612e2 100644 (file)
@@ -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))