On Thu, 5 Jan 2012 13:08:21 +0100, BP (Björn) wrote:

> I need some advice on how to fix this build failure. The GtkAda package 
> builds 
> fine in Mock, but fails in Koji with the error "No matching arches were 
> found":
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=3621310
> 
> Several Ada packages need an ExclusiveArch directive to prevent attempts to 
> build them on secondary architectures where GNAT isn't available. I thought 
> it 
> would be a good idea to keep the list of architectures in a macro to get 
> closer to a single point of truth. I defined the macro in 
> /etc/rpm/macros.gnat 
> in the package fedora-gnat-project-common:
> 
> %GNAT_arches %{ix86} x86_64 ia64 ppc ppc64 alpha
> 
> GtkAda uses the macro like this:
> 
> BuildRequires: fedora-gnat-project-common >= 3.3
> ExclusiveArch: %{GNAT_arches}
> 
> I *think* the reason why the build fails in Koji might be that Koji reads the 
> ExclusiveArch directive to figure out which build server should handle the 
> build, and it doesn't pull in buildrequired packages before doing that, so 
> GNAT_arches is undefined. Does this analysis seem correct?

Yes.

$ rpm -qp GtkAda-2.18.0-2.fc17.src.rpm --qf "%{exclusivearch}\n"
%{GNAT_arches}
 
> If so, what should I do about it? Should macros simply not be used in the 
> ExclusiveArch directive? I see ghc_arches, mono_arches and ocaml_arches in 
> other files in /etc/rpm. Those files all belong to redhat-rpm-config. Would 
> this 
> work if GNAT_arches were defined in redhat-rpm-config instead of fedora-gnat-
> project-common?

Sounds plausible, because with redhat-rpm-config in the buildroot, the
src.rpm would be fine with a defined macro.

> Is it significant that all three filenames end in "-srpm"? Or 
> should this be considered a bug in Koji?

I think the -srpm in there is not important.

$ ls /etc/rpm
macros.color   macros.fjava     macros.mono-srpm   macros.systemd
macros.dist    macros.gconf2    macros.ocaml-srpm  macros.texlive
macros.emacs   macros.ghc-srpm  macros.perl
macros.faldor  macros.jpackage  macros.prelink
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to