> >
> > > Hi,
> > >
> > > I have a noarch package that has a requirement on another package
> > > (qemu-img) that doesn't exist on i386 and ppc64. This results in
> > > 'broken dependency' errors from koji. How do I tell koji not to
> > > build on these arches?
> >
> > Is the problem in Fedora or in EPEL? Because qemu-img exists on all
> > arches in Fedora.
> >
>
> It's an EPEL-only problem. The package just contains a bunch of
> scripts, some of which depend on qemu-img. Another possibility would
> be to exclude those scripts and the the dependency on qemu-img for
> i686. But then the content of the package would be different between
> arches.
>
> Not sure if that's better though. Or make it an arch package for EPEL
> and noarch for Fedora?
add "ExclusiveArch: x86_64" when built in EPEL (%if 0%{?rhel} ...)
That's what I tried first but it doesn't work. I.e.:
BuildArch: noarch
%if 0%{?rhel}
# Only build on x86_64 for EPEL because qemu-img only exists for that arch
ExclusiveArch: x86_64
%endif
Results in the following build failure:
ENTER do(['bash', '--login', '-c', 'rpmbuild -bb --target
noarch
--nodeps builddir/build/SPECS/cloud-utils.spec'], False,
'/var/lib/mock/dist-6E-epel-build-1648550-284397/root/', None, 86400,
True, False, 419, 492, None, False, {'LANG': 'en_US.UTF-8',
'TERM':
'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock',
'PROMPT_COMMAND':
'echo -n "<mock-chroot>"', 'HOME': '/builddir',
'PATH':
'/usr/bin:/bin:/usr/sbin:/sbin'},
logger=<mockbuild.trace_decorator.getLog object at 0x1003adbdf10>)
Executing command: ['bash', '--login', '-c', 'rpmbuild -bb
--target
noarch --nodeps builddir/build/SPECS/cloud-utils.spec'] with env
{'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL':
'/bin/bash',
'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n
"<mock-chroot>"',
'HOME': '/builddir', 'PATH':
'/usr/bin:/bin:/usr/sbin:/sbin'}
error: Architecture is not included: noarch
Building target platforms: noarch
Building for target noarch
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target noarch
--nodeps
builddir/build/SPECS/cloud-utils.spec']
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py",
line 70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 359, in do
raise mockbuild.exception.Error, ("Command failed. See logs for
output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target noarch
--nodeps
builddir/build/SPECS/cloud-utils.spec']
LEAVE do --> EXCEPTION RAISED
...Juerg