Description of problem: I have subversion repository with spec file and sources. spec file contains this line: BuildArch: i686 If I use mock with --scm-enable option to build directly from repository then I get this error: DEBUG: Fetched sources from SCM DEBUG: Preparing SCM sources error: No compatible architectures found for build ERROR: can't parse specfile Traceback (most recent call last): File "/usr/sbin/mock", line 306, in <module> def do_buildsrpm(config_opts, chroot, options, args): File "/usr/sbin/mock", line 507, in main (options.sources, options.spec) = scmWorker.prepare_sources() File "<peak.util.decorators.rewrap wrapping mockbuild.scm.prepare_sources at 0x0277E9B0>", line 3, in prepare_sources def prepare_sources(self): return __decorated(self) File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace result = func(*args, **kw) File "/usr/lib/python2.7/site-packages/mockbuild/scm.py", line 136, in prepare_sources rpm_spec = ts.parseSpec(self.spec) File "/usr/lib64/python2.7/site-packages/rpm/transaction.py", line 41, in parseSpec return _rpmb.spec(specfile) ValueError: can't parse specfile It works fine if I first use mock to build src.rpm (--buildsrpm) or if I run "setarch i686 mock ..." Version-Release number of selected component (if applicable): mock-1.1.38-1.fc19.noarch How reproducible: 100% Steps to Reproduce: 1. Setup subversion repository with spec file containing "BuildArch: i686" 2. Install mock on x86_64 host 3. mock --verbose --root fedora-19-i386 --scm-enable --scm-option <scm options> Actual results: mock fails Expected results: mock builds RPM Additional info: I can build other RPMs which don't specify BuildArch the same way without any problems. This only happens if spec file contains "BuildArch: i686" The same happens with mock 1.1.39-1
Commited as 0ffe9f8 in msuchy-work branch.
Note that the fix is just workaround of bug 1115483.
Fixed in mock-1.2.0, which just landed in rawhide.