[jhbuild] base: Search for 'meson.build' in the right path
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] base: Search for 'meson.build' in the right path
- Date: Sat, 4 Jul 2020 17:17:34 +0000 (UTC)
commit 0e2be9c9acbed59b18b63e6d776890532688f1da
Author: Diego Escalante Urrelo <diegoe gnome org>
Date: Fri Jul 3 19:17:21 2020 -0500
base: Search for 'meson.build' in the right path
Commit 2cc433db003c054b6a081047c48ef995f440d645 naively tested for the
cwd, assuming that `jhbuild buildone` would switch you to the checkout
path of the automatic module, so the condition was never met unless your
shell's cwd was the checked out module. Now it builds the expected path
of checkoutdir + modname.
This also inverts the if-else so that we search for autogen.sh instead
of meson.build. This means that when the code has not been checked out
yet (so that there's no files at all) this will default to meson.
jhbuild/commands/base.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/jhbuild/commands/base.py b/jhbuild/commands/base.py
index f7d0682f..e78578bd 100644
--- a/jhbuild/commands/base.py
+++ b/jhbuild/commands/base.py
@@ -328,13 +328,14 @@ class cmd_buildone(BuildCommand):
if not default_repo:
continue
- # Try meson first, then autotools
- if os.path.exists(os.path.join(self.get_cwd(), 'meson.build')):
- from jhbuild.modtypes.meson import MesonModule
- module = MesonModule(modname, default_repo.branch(modname))
- else:
+ # If the module has not been checkout yet, this will
+ # fail and default to meson
+ if os.path.exists(os.path.join(config.checkoutroot, modname, 'autogen.sh')):
from jhbuild.modtypes.autotools import AutogenModule
module = AutogenModule(modname, default_repo.branch(modname))
+ else:
+ from jhbuild.modtypes.meson import MesonModule
+ module = MesonModule(modname, default_repo.branch(modname))
module.config = config
logging.info(_('module "%(modname)s" does not exist, created automatically using repository
"%(reponame)s"') % \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]