[Rpm-maint] [rpm-software-management/rpm] [RFE] Please provide `%excludes` section (Issue #1852)

Vít Ondruch notifications at github.com
Thu Dec 2 12:58:23 UTC 2021


There is `%exclude` macro which excludes file from package. However, it does not exclude the file from other processing such as generating debuginfo or what not and it causes confusion (there is probably more examples in #994).

So I was thinking wouldn't it be possible to have `%excludes` section instead? The idea is that the `%excludes` section would list files similarly to the `%files` sections, but these files would not be packaged. Let me give a brief example:

~~~
... snip ...

%install

... snip ...

mkdir -p %{buildroot}%{_sysconfdir}/libreport/events.d/
cp -a .%{gem_instdir}/config/ruby_event.conf %{buildroot}%{_sysconfdir}/libreport/events.d/

... snip ...

%files
%{gem_instdir}
%exclude %{gem_instdir}/config
%config(noreplace) %{_sysconfdir}/libreport/events.d/ruby_event.conf

%excludes
%{gem_instdir}/config

... snip ...
~~~

Note that the `%{gem_instdir}/config` is excluded form the main package, but then it is not obvious if it should not be included elsewhere. Therefore it is listed for the second time in the `%excludes` section to make it clear it is not forgotten and it should really be excluded.

In the simple scenario, I can imagine the functionality as RPM creating some `%{name}-exclude` subpackage containing such files and later just `rm %{name}-exclude` such package. Of course, it could also mean that some processing of such files is ignored at some point but that is just optimization.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1852
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211202/83c10667/attachment.html>


More information about the Rpm-maint mailing list