On Thu, Oct 26, 2006 at 03:20:31PM +0530, Lis Maria Thomas wrote: > Hi > > There is a variable defind at my %prep section as > > new_variable_new=aaa > > And while doing the rpm build, I am givin the following command > > rpmbuild -ba yyy.spec --define "_build_name_fmt > $new_variable_new.%_arch.rpm" > > > The binary rpm it is creating is not takin the value specified, rather > it is giving the output as : > > Wrote: /home/sssss/redhat/RPMS/.i386.rpm > Wrote: /home/sssss/redhat/RPMS/.i386.rpm It is taking the value you specified. At the moment you called rpmbuild, $new_variable_new didn't exist, did it? The %prep, %build, %install, and others are scripts that rpmbuild creates, and executes as outside programs. They can't influence rpmbuild environment. > Can u help me out with what could be the possible mistake I have > made... You'll have to use spec's conditional statements to set _build_name_fmt. And you can set _build_name_fmt to the output of a script too, with something like: %define _build_name_fmt %(echo pkg) -- lfr 0/0
Attachment:
pgpDRuuDGNcdO.pgp
Description: PGP signature
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list