[Bug 2050889] Review Request: python-hatchling - The build backend used by Hatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2050889



--- Comment #9 from Ben Beasley <code@xxxxxxxxxxxxxxxxxx> ---
I still don’t see how removing the %dir line doesn’t create a textbook case of
an unowned directory[1].

> $ mock fedora-36-x86_64 --clean
> $ mock -r fedora-36-x86_64 --enablerepo=local -i python3-hatchling-0.11.3-1.fc36.noarch.rpm
> $ mock -r fedora-36-x86_64 --chroot 'rpm -q --whatprovides /usr/lib/python3.10/site-packages/hatchling-0.11.3.dist-info/license_files'
> […]
> /usr/lib/python3.10/site-packages/hatchling-0.11.3.dist-info/license_files is not owned by any package

> Also, without the explicit %dir line, the package still builds fine

Agreed. Only unowned files are RPM build errors, so the package will build fine
whether the %dir line is needed or not.

> and after its uninstallation, there are no leftovers.

We must have tested this differently. In my testing, the directory was indeed
left behind after uninstallation. Continuing the mock/shell session from
earlier in this comment:

> $ mock -r fedora-36-x86_64 --dnf-cmd -- remove python3-hatchling
> $ find /var/lib/mock/fedora-36-x86_64/root/usr/lib/python3.10/site-packages/ -type d
> /var/lib/mock/fedora-36-x86_64/root/usr/lib/python3.10/site-packages/
> /var/lib/mock/fedora-36-x86_64/root/usr/lib/python3.10/site-packages/hatchling-0.11.3.dist-info
> /var/lib/mock/fedora-36-x86_64/root/usr/lib/python3.10/site-packages/hatchling-0.11.3.dist-info/license_files

> If you have a/b/c/d.txt and RPM explicitly owns b and d.txt I believe that there is no need to specify also ownership of c.

The guidelines aren’t infallible, but isn’t that pretty much what this
example[2] is about? It shows that to package

> %{_datadir}/%{name}/pixmaps/*.png

we need

> %dir %{_datadir}/%{name}
> %dir %{_datadir}/%{name}/pixmaps
> %{_datadir}/%{name}/pixmaps/*.png

not just

> %dir %{_datadir}/%{name}
> %{_datadir}/%{name}/pixmaps/*.png

[1]
https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/
[2]
https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/#_only_including_files


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2050889
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux