#1224 MBS doesn't like package repos without master branches
Closed: Fixed 4 years ago by mprahl. Opened 4 years ago by bstinson.

If I have a dist-git repo with only stream branches (that is, no distro branches, and no master branch), MBS fails to build a module with the following error:

WARNING:module_build_service:Exception UnprocessableEntity('Failed on [\'git\', \'rev-parse\', \'master\'], retcode 128, out b\'master\\n\', err b"fatal: ambiguous argument \'master\': unknown revision or path not in the working tree.\\nUse \'--\' to separate paths from revisions, like this:\\n\'git <command> [<revisi
on>...] -- [<file>...]\'\\n"') raised from <function SCM._run at 0x7f3e6ad47bf8>.  Retry in 15s

I'd like to not have to create empty commits on master for this to work.


The proposal in #1226 might be of your interest.

@bstinson could you please share your modulemd file that is causing this issue?

@bstinson and I debugged this together, and it seems that when _scm_get_latest instantiates the SCM class, it doesn't pass in a branch, so the SCM class tries to find the commit hash of the master branch. When there's no master branch, this fails. The solution is to not try to determine this when the class is instantiated. It seems odd that's it reaching out over the network in the __init__ method anyways.

This should be addressed by #1240

Metadata Update from @mprahl:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1240 Merged 4 years ago