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

Re: Where a newly-built rpm resides?



Isaac Claymore <clay@dawning.com.cn> wrote :

> I have script who does 'rpmbuild -tb foo.tgz', and I need to know
> where the newly-built rpms reside, since _topdir can be redefined by
> users.
> 
> Is grepping rpmbuild outputs the only way?

In your script, you could get the current value with:
rpm --eval '%{_topdir}'

But to be more accurate, you'd probably want to do this instead:
rpm --eval '%{_rpmdir}/%{_rpmfilename}'
rpm --eval '%{_srcrpmdir}/%{_rpmfilename}'

As indeed users may redefine any of the above (and I know I do).

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Red Hat Linux release 8.0.9x (Phoebe) running Linux kernel 2.4.20-2.54
Load : 2.08 1.57 0.90, AC on-line, battery charging: 100% (5:39)





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