[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: determine rpm build arch



On Mon, 6 Sep 2004, Tsai Li Ming wrote:

> Panu Matilainen wrote:
> > On Sun, 5 Sep 2004, Tsai Li Ming wrote:
> > 
> > 
> >>Hi
> >>
> >>Is there a way to determine the arch of the rpm being created by 
> >>rpmbuild, other than looking at the output for the following lines:
> >>
> >>Wrote: /home/build/redhat/SRPMS/pkg-1.1-0.src.rpm
> >>Wrote: /home/build/redhat/RPMS/ia64/pkg-1.1-0.ia64.rpm
> > 
> > 
> > You mean inside specfile? %{_arch} contains it, eg in above case 'ia64'.
> > 
> > 	- Panu -
> 
> I am more interested into the supported arch that the rpmbuild on a 
> specified platform. The rpmbuild --showrc does show the build arch but 
> is there a more programatic way to get the suppoerted build arc?
> 
> If possible, would it be possible to detect the arch of the rpm being 
> created?

I'm not quite sure what you mean here... You can't reliably know what a 
given rpmbuild command is doing outside the build process itself, meaning 
the specfile where the target architecture is in %{_arch} macro.

'rpm --eval "%{_arch}"' gives you the default architecture of the system 
and you can ask a specfile for it's BuildArchitecture with
'rpm -q --specfile --qf "%{arch}\n" foo.spec' but that doesn't tell you 
how an rpmbuild command was started, eg with --target i686,athlon.

If that doesn't answer your question then explaining what you're actually 
trying to do might help producing a more useful answer.

	- Panu -



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]