GNOME Bugzilla – Bug 700731
Fix --in-[checkout|build]dir when passing no args to the `run' command
Last modified: 2013-07-10 15:00:01 UTC
The internal module list generation fails if no argument is being passed to the `run' command: $ jhbuild run --in-checkoutdir=glib Traceback (most recent call last):
+ Trace 231975
jhbuild.main.main(sys.argv[1:])
return cmd.execute(config, args, help)
return self.run(config, options, args)
checkoutdir = module_list[0].get_srcdir(build)
Created attachment 244833 [details] [review] Fix --in-[checkout|build]dir when passing no args to the `run' command Fix `jhbuild run --in-checkoutdir=glib' and let it fail properly instead of raising an exception.
Review of attachment 244833 [details] [review]: The code here is...very strange. The original code, not your new code. We're not even referencing "modname" in the list comprehension. It'd be clearer if it was: module = module_set.get_module(...) build = get_buildscript(config, [module], module_set=module_set) Anyways though this looks fine.
The following fix has been pushed: 12b85ab Fix --in-[checkout|build]dir when passing no args to the `run' command
Created attachment 248836 [details] [review] Fix --in-[checkout|build]dir when passing no args to the `run' command Fix `jhbuild run --in-checkoutdir=glib' and let it fail properly instead of raising an exception.
Thanks Colin! I've applied the change you suggested in bug #703954, taking the chance to deduplicate a bit the handling of the --in-builddir and --in-checkoutdir options. If you have a few moments to review that it would be appreciated. :D