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

Re: Heads up: Noarch Subpackages



On Friday 13 February 2009, Florian Festi wrote:
> Ville Skyttä wrote:
> > Regarding policy changes, one candidate for addition would be that if a
> > non-noarch package does noarch subpackages, it MUST BuildRequire
> > rpm-build >= 4.6.0.  Or if there's a way to wrap the "BuildArch: noarch"
> > for subpackages in a %if $something ... %endif where $something evaluates
> > to true only in rpmbuild versions supporting these noarch subpackages,
> > that'd be ok too. [...]
>
> I agree that this is a problem. But I very much dislike putting
> BuildRequires to rpm versions into spec files. If we start with that every
> package will have them very soon. We - RPM upstream - are already working
> on the next improvements for rpmbuild that would also lead to such
> BuildRequires. Even worse is that they will get outdated easily and
> unnoticed - as they are only being some last line of defence - and though
> be useless when they are really needed.

What about the '%if $something ... %endif where $something evaluates to true 
only in rpmbuild versions supporting these noarch subpackages' alternative?  
Many package maintainers would like to use the exact same specfile for many 
distro versions (not only Fedora, but at least EPEL as well).  Related 
ticket: http://rpm.org/ticket/33

What I've found "working" so far is ugliness like this, I hope something 
better emerges:

%define rpmver  %(v=`rpmbuild --version | sed -e 's/.* //'` ; echo ${v:-0})
[...]
%package foo
%if "%{rpmver}" > "4.6.0"
BuildArch:      noarch
%endif
[...]


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