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
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to