[Rpm-maint] [rpm-software-management/rpm] Allow to eclude files from %doc (#1298)

Vít Ondruch notifications at github.com
Fri Jul 3 10:36:00 UTC 2020


I would expect the following to work:

~~~
%files
%doc README.md CHANGELOG.md docs
%exclude %{_datadir}/doc/git-lfs/docs/mangen
%exclude %{_datadir}/doc/git-lfs/docs/man/*.{1,5}
%exclude %{_datadir}/doc/git-lfs/docs/man/mangen.go
~~~

Unfortunately, the `%doc` directive is unexpectedly processed after all the other content of `%files` section:

~~~
Processing files: git-lfs-2.11.0-2.el8.x86_64
warning: File not found: /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs/docs/mangen
warning: File not found: /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs/docs/man/*.{1,5}
warning: File not found: /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs/docs/man/mangen.go
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.GsRXAE
+ umask 022
+ cd /builddir/build/BUILD
+ cd git-lfs-2.11.0
+ DOCDIR=/builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs
+ export LC_ALL=C
+ LC_ALL=C
+ export DOCDIR
+ /usr/bin/mkdir -p /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs
+ cp -pr README.md /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs
+ cp -pr CHANGELOG.md /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs
+ cp -pr docs /builddir/build/BUILDROOT/git-lfs-2.11.0-2.el8.x86_64/usr/share/doc/git-lfs
+ exit 0
~~~

Would it be possible to process the `%doc` earlier to allow the `%exclude` to take its action?

-- 
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/1298
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200703/17fff3f8/attachment.html>


More information about the Rpm-maint mailing list