Re: determine rpm build arch

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

 



Panu Matilainen wrote:
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 -

Hi

Thanks for your help. I was looking for a way to get the arch of the rpm before it was being built. rpm -q --specfile --qf "%{arch}\n" specfile will work in my situtation because it is part of my build system that controls how the rpm is being built.

Thanks,
Liming



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux