Bug 1466792

Summary: "mbs-build local": missing dep on mock-scm
Product: [Fedora] Fedora Reporter: Nils Philippsen <nphilipp>
Component: module-build-serviceAssignee: Ralph Bean <rbean>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: fvalder, jkaluza, rbean, sgallagh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-11 21:06:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nils Philippsen 2017-06-30 13:19:20 UTC
Description of problem:
"mbs-build local" needs the mockbuild.scm Python package which is in the mock-scm RPM package, but there's no dependency on it.

Version-Release number of selected component (if applicable):
module-build-service-1.3.24-2.fc26.noarch

How reproducible:
Reproducible

Steps to Reproduce:
1. "mbs-build local"

Actual results:
...
ERROR: local variable 'mockbuild' referenced before assignment
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 714, in run_command
    import mockbuild.scm
ImportError: No module named 'mockbuild.scm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 886, in <module>
    main()
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 89, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 701, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 89, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 716, in run_command
    raise mockbuild.exception.BadCmdline(
UnboundLocalError: local variable 'mockbuild' referenced before assignment
...

Expected results:
Module builds successfully.

Comment 1 Ralph Bean 2017-08-11 21:06:45 UTC
Patched in the spec file.

https://src.fedoraproject.org/rpms/module-build-service/c/90f3f4c375509d25665bc8215a2b663f0d9069eb?branch=master

Should be fixed in the next release.