On Tue, Nov 25, 2003 at 01:26:59PM +0200, Mihai Maties wrote: > Hello, > > I have a small shell script that figures out the linux distribution the rpm > was built on to include a small part into the "release" field so the final > package will be named something like: name-version-4.rh9.i386.rpm. The > problem is that the script is executed also when I build the src.rpm file > thus the name "mdk92.src.rpm" it's pretty annoying... > > How can I differentiate inside the spec the invocation of a src.rpm build from > the binary build ? You can use Release: 4%{disttag} and invoke rpmbuild with (of the top of my head) rpmbuild -bs --define 'disttag %{nil}' ... rpmbuild -bb --define 'disttag .rh9' ... You will nevertheless have a reference to rh9.src.rpm in your binary build and AFAIK you are stuck with the src.rpm release with --rebuild. Long shot: You could possibly manipulate RPM field contents after building the rpms and before signing them, e.g. you could "correct" release values post-building. I am thinking about that as it would save me quite a lot of space for some distros sharing the same src.rpm up to the release. Jeff and other die hard rpm experts, is there an (easy) way to change the RPM release field in an unsigned rpm? If it's only a python two-liner, would you please post it? :) Thanks! -- Axel.Thimm@xxxxxxxxxxxxxxxxxxx
Attachment:
pgp00002.pgp
Description: PGP signature