[PATCH RFC 2/6] spec: Use more %{name} macro

Daniel P. Berrangé berrange at redhat.com
Wed Nov 30 10:06:46 UTC 2022


On Wed, Nov 23, 2022 at 04:11:51PM -0700, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>  libvirt.spec.in | 250 ++++++++++++++++++++++++------------------------
>  1 file changed, 125 insertions(+), 125 deletions(-)



> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 277ecd3eb3..3c9975b684 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -239,33 +239,33 @@ URL: https://libvirt.org/
>  %endif
>  Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
>  
> -Requires: libvirt-daemon = %{version}-%{release}
> -Requires: libvirt-daemon-config-network = %{version}-%{release}
> -Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
> +Requires: %{name}-daemon = %{version}-%{release}
> +Requires: %{name}-daemon-config-network = %{version}-%{release}
> +Requires: %{name}-daemon-config-nwfilter = %{version}-%{release}

I think if anything, I would go the other way and eliminate
almost all existing use of '%{name}'. It isn't like we're ever
going to change what %{name} expands to, so IMHO it just harms
legibility.

I think the only exception I see is '%find_lang %{name}'
since that is a documented design pattern for Fedora.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


More information about the libvir-list mailing list