aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
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/wrap
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/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 98b30ee..774544a 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -103,24 +103,12 @@ class PackageDefinition:
self.provided_deps[self.name] = None
if fname.endswith('.wrap'):
self.parse_wrap(fname)
- else:
- self.guess_type();
self.directory = self.values.get('directory', self.name)
if os.path.dirname(self.directory):
raise WrapException('Directory key must be a name and not a path')
if self.type and self.type not in ALL_TYPES:
raise WrapException('Unknown wrap type {!r}'.format(self.type))
- def guess_type(self) -> None:
- if os.path.exists(os.path.join(self.filename, '.git')):
- # This is a git subproject without wrap file. Either the user cloned
- # it manually, or it's a git submodule. The revision is used in
- # msubprojects.py to update the git repo. If it's a submodule the repo
- # is likely detached and revision will be empty.
- res, stdout = quiet_git(['branch', '--show-current'], self.filename)
- self.values['revision'] = stdout.strip()
- self.type = 'git'
-
def parse_wrap(self, fname: str) -> None:
try:
self.config = configparser.ConfigParser(interpolation=None)