openSUSE / python-rpm-macros

Multi-Python, Single-Spec macros generator
Other
22 stars 20 forks source link

fdupes could be run for %doc files #166

Closed mcepl closed 10 months ago

mcepl commented 10 months ago
[   20s] python-blinker-doc.noarch: W: files-duplicate /usr/share/doc/packages/python-blinker-doc/html/_static/blinker-named.png /usr/share/doc/packages/python-blinker-doc/html/_images/blinker-named.png
[   20s] Your package contains duplicated files that are not hard- or symlinks. You
[   20s] should use the %fdupes macro to link the files to one.

These are files which were never installed in %install section, but automagically via %doc as in

%files -n python-blinker-doc
%doc docs/_build/html

Also note, that this is a subpackage so the location is NOT in /usr/share/doc/packages/%{name} of the main package.

Now the question is whether we should make fdupes automatic dependency of all Python packages and run it automatically for any (sub-)packages containing any files in %doc (i.e., all packages).

bnavigator commented 10 months ago

%doc is evaluated from the %files section in a different rpmbuild stage than we (python-rpm-macros) could inject an %fdupes call.

mcepl commented 10 months ago

Oh well, I liked the idea.