aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-09-16 11:05:44 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-09-18 03:01:15 +0000
commite0cd54a32298073830e9141da85aef91dce709e9 (patch)
tree97faf7e983aae6e7280e8783a135c6114071793d /mesonbuild/msubprojects.py
parentc203e2f92b118eb1138246b1eefd179161f54aab (diff)
downloadmeson-e0cd54a32298073830e9141da85aef91dce709e9.zip
meson-e0cd54a32298073830e9141da85aef91dce709e9.tar.gz
meson-e0cd54a32298073830e9141da85aef91dce709e9.tar.bz2
msubprojects: Stop trying to guess subproject type
It was done to include them in `meson subprojects foreach` without --types argument, but it's better to special case missing --types and include wraps that have type=None too. It was a bad idea because that was messing them in `meson subprojects update`, now they are ignored by that command.
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-xmesonbuild/msubprojects.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 9523dd3..d515389 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -268,7 +268,7 @@ def foreach(wrap, repo_dir, options):
def add_common_arguments(p):
p.add_argument('--sourcedir', default='.',
help='Path to source directory')
- p.add_argument('--types', default=ALL_TYPES_STRING,
+ p.add_argument('--types', default='',
help='Comma-separated list of subproject types. Supported types are: {} (default: all)'.format(ALL_TYPES_STRING))
def add_subprojects_argument(p):
@@ -328,13 +328,13 @@ def run(options):
wraps = [wrap for name, wrap in r.wraps.items() if name in options.subprojects]
else:
wraps = r.wraps.values()
- types = [t.strip() for t in options.types.split(',')]
+ types = [t.strip() for t in options.types.split(',')] if options.types else []
for t in types:
if t not in ALL_TYPES:
raise MesonException('Unknown subproject type {!r}, supported types are: {}'.format(t, ALL_TYPES_STRING))
failures = []
for wrap in wraps:
- if wrap.type not in types:
+ if types and wrap.type not in types:
continue
dirname = os.path.join(subprojects_dir, wrap.directory)
if not options.subprojects_func(wrap, dirname, options):