When 'mbs-build local' is run from a directory with a git repository, but not a module dist-git checkout, it'll print a python traceback:
INFO: You have not provided SCM URL or branch. Trying to get it from current working directory INFO: Starting local build of file:///home/karsten/vim, branch master 2017-07-25 16:25:28,327 - MainThread - module_build_service - DEBUG - Setting topics: 2017-07-25 16:25:28,439 - MainThread - module_build_service - DEBUG - Verifying modulemd 2017-07-25 16:25:28,441 - MainThread - module_build_service - DEBUG - Getting/verifying commit hash for file:///home/karsten/vim Traceback (most recent call last): File "/usr/bin/mbs-manager", line 11, in <module> load_entry_point('module-build-service==1.3.24', 'console_scripts', 'mbs-manager')() File "/usr/lib/python2.7/site-packages/module_build_service/manage.py", line 316, in manager_wrapper manager.run() File "/usr/lib/python2.7/site-packages/flask_script/init.py", line 412, in run result = self.handle(sys.argv[0], sys.argv[1:]) File "/usr/lib/python2.7/site-packages/flask_script/init.py", line 383, in handle res = handle(args, config) File "/usr/lib/python2.7/site-packages/flask_script/commands.py", line 216, in call return self.run(*args, kwargs) File "/usr/lib/python2.7/site-packages/module_build_service/manage.py", line 153, in build_module_locally skiptests=skiptests) File "/usr/lib/python2.7/site-packages/module_build_service/utils.py", line 733, in Submit_module_build_from_scm mmd, scm, yaml = _fetch_mmd(url, branch, allow_local_url) File "/usr/lib/python2.7/site-packages/module_build_service/utils.py", line 431, in _fetch_mmd with open(cofn, "r") as mmdfile: IOError: [Errno 2] No such file or directory: '/tmp/tmpmkYfqo/vim/vim.yaml'
This error should be checked and a meaningful error message should be printed instead of a traceback
I do this quite a lot and don't run into any issues.
Are you sure you have commited your changes and aren't running mbs-build local in a freshly created repo? The changes need to be commited (not pushed) for this to work -- https://pagure.io/fm-orchestrator/issue/616
mbs-build local
I can confirm that mbs-build local works just fine when run in a module dist-git checkout, but that wasn't the issue here.
Ok, a little more explanation: I've intentionally run 'mbs-build local' from a normal dist-git directory like the one you'll get with 'fedpkg clone vim'. This will get you the vim spec file and some other stuff, but not a module checkout.
For a better user experience it would be great to not traceback here but to display an error message that shows the user what is wrong.
OK - so we just need to print a nicer error message. :)
Metadata Update from @fivaldi: - Issue assigned to fivaldi
See PR#626
Metadata Update from @fivaldi: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.