That way, accidentally unpackaged files within are reported as errors.
Currently, when %pyproject_extras_subpkg is used, the dist-info directory
is packaged as %ghost. When the main package does not have it,
the RPM build would succeed. The extras packages would have the python3dist()
requires and provides, but the main package would not.
By adding %dir after %ghost, we only package the directory
(which is enough for python3-rpm-generators to process it),
but the files in the directory are not included.
When not packaged in the main package, the RPM build fails.
This is a safeguard against packaging mistakes.
The visible difference is that rpm -ql/repoquery -l would only return the metadata directory.
See also https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/195
- The -l flag can be used to assert at least 1 License-File was detected
- The -L flag explicitly disables this check (which remains the default)
Co-Authored-By: Maxwell G <maxwell@gtmx.me>