#183 module-build-local: mbs-manager: error: too many arguments
Closed: Fixed Opened by jaruga.

Running module build command on my local, I got an error.
I guess the command is like $ mbs-build local.
Any idea to fix?

This is what I talked with @contyk .

$ fedpkg module-build-local
usage: mbs-manager [-d] [-v] [-q] [-?]
                   {shell,run,db,runserver,upgradedb,build_module_locally,cleardb}
                   ...
mbs-manager: error: too many arguments
Could not execute module_build_local: Command '['mbs-manager', 'build_module_locally', 'https://src.fedoraproject.org/modules/ruby.git?#f938da2a53708bb41ed4e790668cc6f8a5986c94', 'master']' returned non-zero exit status 2

My environment is like this. These are latest version on Fedora 27.

$ rpm -q fedpkg
fedpkg-1.31-1.fc27.noarch
$ rpm -qf /usr/bin/mbs-manager
module-build-service-1.6.3-2.fc27.noarch
$ rpm -q mock
mock-1.4.8-1.fc27.noarch

I would share my remote repository status just in case.

$ git remote -v
jaruga  ssh://pkgs.fedoraproject.org/forks/jaruga/modules/ruby.git (fetch)
jaruga  ssh://pkgs.fedoraproject.org/forks/jaruga/modules/ruby.git (push)
jscotka https://src.fedoraproject.org/forks/jscotka/modules/ruby.git (fetch)
jscotka https://src.fedoraproject.org/forks/jscotka/modules/ruby.git (push)
origin  ssh://pkgs.fedoraproject.org/modules/ruby.git (fetch)
origin  ssh://pkgs.fedoraproject.org/modules/ruby.git (push)

Seeing the help, we do not have to specify scm_url and branch, right?

$ fedpkg module-build-local --help
usage: fedpkg module-build-local [-h] [--skip-tests]
                                 [--add-local-build BUILD_ID]
                                 [scm_url] [branch]
Build a module locally using the mbs-manager command
positional arguments:
  scm_url               The module's SCM URL. This defaults to the current
                        repo.
  branch                The module's SCM branch. This defaults to the current
                        checked-out branch.
optional arguments:
  -h, --help            show this help message and exit
  --skip-tests          Adds a macro for skipping the check section
  --add-local-build BUILD_ID
                        Import previously finished local module builds into
                        MBS

I installed module-build-service 1.7.0 that is in testing in Bodhi.
But the situation was same.

https://bodhi.fedoraproject.org/updates/FEDORA-2018-ce8651ff57
https://koji.fedoraproject.org/koji/buildinfo?buildID=1029731

$ rpm -q module-build-service
module-build-service-1.7.0-1.fc27.noarch
$ fedpkg module-build-local
usage: mbs-manager [-d] [-v] [-q] [-?]
                   {shell,run,db,runserver,upgradedb,build_module_locally,cleardb}
                   ...
mbs-manager: error: too many arguments
Could not execute module_build_local: Command '['mbs-manager', 'build_module_locally', 'https://src.fedoraproject.org/modules/ruby.git?#f938da2a53708bb41ed4e790668cc6f8a5986c94', 'master']' returned non-zero exit status 2

@jaruga fedpkg module-build-local is a wrapper for mbs-manager under the hood. The interface to mbs-manager changed and this PR fixes it in fedpkg:
https://pagure.io/rpkg/pull-request/264

The problem is that that rpkg change isn't going to be released until the end of the month. So fedpkg module-build-local will be broken until that update comes out. In the meantime, you can use mbs-build local.

Sorry about the confusion.

Yeah, thanks @mprahl for the feedback. @jaruga Sorry for inconvenience at this moment. A new rpkg release is in progress now. There will be Spring Festival Holidays in China. I'll continue working on the release when I'm back from holidays.

@mprahl @cqi OK thanks for the information!
As now I know that the fedpkg command is a wrapper, and I can run $ mbs-build local instead of the command, this issue is not urgent. Enjoy the Chinese New Year!

@jaruga Hi, please try the new release rpkg-1.52, that should work for you.

@cqi Hi, thanks! it looks working for the new release version!
Feel free to close this ticket.

$ rpm -q python2-rpkg
python2-rpkg-1.52-1.fc27.noarch
$ fedpkg module-build-local
2018-03-06 11:56:44,554 - MainThread - module_build_service - DEBUG - Creating new module build
2018-03-06 11:56:44,601 - MainThread - module_build_service - WARNING - Hub not initialized.  Queueing on the side.
...

Metadata Update from @cqi:
- Issue status updated to: Closed (was: Open)

Metadata Update from @cqi:
- Issue close_status updated to: Fixed

Metadata