On Wed, Jan 13, 2016 at 06:35:08PM -0600, Jason L Tibbitts III wrote:
> >>>>> "AT" == Andrew Toskin <and...@tosk.in> writes:
> 
> AT> Is there a way to convert tags like "BuildRequires:" into %macros so
> AT> that they *can* be indented?
> 
> Sure there is, but.... please don't actually try to do that in Fedora
> packages.  There are cases where such things might be easier to read,
> but in general I don't think that would be the case.
> 
> A better approach if you care about readability is to stop trying to use
> one spec across everything.  You don't need any
> %if clauses at all if you do that.

Agreed, except ...

> Or you could locate the situations which cause large numbers of packages
> to require %if clauses in order to keep spec compatibility across
> multiple releases.  Make lists and bring them forward for discussion.
> It might be possible to do something about it.

%ifarch is essential when dealing with secondard architectures that
may not build all the features/packages required for a big package.
Example:

http://pkgs.fedoraproject.org/cgit/rpms/libguestfs.git/tree/libguestfs.spec#n166

Also being able to build subsets of packages (when building manually)
is a nice to have sometimes, eg:

http://pkgs.fedoraproject.org/cgit/rpms/libvirt.git/tree/libvirt.spec#n393

(Hmmmm, why is libvirt.spec not using bcond?)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to