diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-05-06 12:11:54 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2022-10-10 17:01:51 -0400 |
commit | 312bede4967efd531614fe0dbe51f1b94d653e86 (patch) | |
tree | b64d85443d390c576a416226826614747ed14c70 /mesonbuild/wrap | |
parent | 46acd6cd4ac33973daee5436dca8c3035c8f464c (diff) | |
download | meson-312bede4967efd531614fe0dbe51f1b94d653e86.zip meson-312bede4967efd531614fe0dbe51f1b94d653e86.tar.gz meson-312bede4967efd531614fe0dbe51f1b94d653e86.tar.bz2 |
wrap: Ignore directories that have a .wrap with the same name
If we update e.g. glib.wrap from wrap-git with directory=glib to
wrap-file with directory=glib-2.70 we could still have the glib
directory that is not referenced by any .wrap file any more. We should
still ignore that directory otherwise it overrides the glib.wrap we
parsed.
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r-- | mesonbuild/wrap/wrap.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 1cc55ee..e62614f 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -283,17 +283,17 @@ class Resolver: if not os.path.isdir(self.subdir_root): return root, dirs, files = next(os.walk(self.subdir_root)) + ignore_dirs = {'packagecache', 'packagefiles'} for i in files: if not i.endswith('.wrap'): continue fname = os.path.join(self.subdir_root, i) wrap = PackageDefinition(fname, self.subproject) self.wraps[wrap.name] = wrap - if wrap.directory in dirs: - dirs.remove(wrap.directory) + ignore_dirs |= {wrap.directory, wrap.name} # Add dummy package definition for directories not associated with a wrap file. for i in dirs: - if i in ['packagecache', 'packagefiles']: + if i in ignore_dirs: continue fname = os.path.join(self.subdir_root, i) wrap = PackageDefinition(fname, self.subproject) |