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

Re: Different "Release" numbers in binary and source RPMs?



On Thu, 28 Sep 2000, Alexey Nogin wrote:

>Is it possible to have different Release numbers in binary and source
>RPMs? I want to be able to have Release: n.rhx.y in binary RPMs built on
>RedHat x.y, but the source RPM to simply be Release:n.

%define release 1rh%([ -f /etc/redhat-release ] && cat /etc/redhat-release |awk '{print $5}' )

Make sure it is all on one big line.  I haven't actually tried
it, but is should work.  Just change the number before "rh" and
you should be ok.

So you'd end up with:

package-1.0.0-1rh6.2.src.rpm - on a 6.2 system.


The equivalent on a bash commanline is:

# echo 1rh$([ -f /etc/redhat-release ] && \
	cat /etc/redhat-release | awk '{print $5}' )

Which prints:
1rh6.2

So it should work.  I haven't tested my %define in an actual RPM
script though.

Let me know if it works for you please.

TTYL


--
         Mike A. Harris  -  Linux advocate  -  Open source advocate
                   Copyright 2000 all rights reserved
                               ----------
"Facts do not cease to exist because they are ignored."
                                               - Aldous Huxley





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