James Ogley
Archives:
December
S M T W T F S
           
8
         

2007
Dec

Advogato Blog

Links:
Bursledon Parish
openSUSE
Poker Stars

Blogroll:
Planet SUSE
Craig B
Dave B
Kat B
Justin D
Nick D
Sally D
Steve H
Tim H
Paul J
Andy & Liz M
Roger W

[RSS 2.0] [RSS 0.91] [Blosxom Powered] [Bursledon Parish] [Use openSUSE] [Get Firefox] [Lib Dems]

© 1995 - 2008
James Ogley

All views expressed on this site are my own. They do not necessarily reflect those of the Parish of Bursledon, the Diocese of Winchester or the Church of England. As such, I do not expect them all to be popular but you, the reader, can certainly expect them to be honest.
08-Dec-2007 09:11 GMT: Testing for target repository in the Build Service

I've updated gconf2-rpm-macros in GNOME:Community in preparation for adding a new target repository, openSUSE_10.2+GNOME_STABLE. The update tests the %suse_version macro and %_repository to determine whether the package needs to be populated. If it doesn't, a dummy package is generated which makes life easier for maintainers of packages which have it in their BuildRequires lines.

This is how it's done: The contents of both %install and %files are wrapped in the following:

%if %suse_version < 1030
%if "%_repository" != "openSUSE_10.2+GNOME_STABLE"
Section content goes here
%endif
%endif

Obviously, if we a 10.2 and GNOME:UNSTABLE repository, an extra layer of %if can be added.