[Rpm-maint] [rpm-software-management/rpm] fileattrs: Tighten pythondist path regex for metadata (RhBug:1618949) (#562)

Zbigniew Jędrzejewski-Szmek notifications at github.com
Tue Oct 2 06:00:12 UTC 2018


keszybz requested changes on this pull request.



> @@ -1,4 +1,4 @@
 %__python_provides	%{_rpmconfigdir}/pythondeps.sh --provides
 %__python_requires	%{_rpmconfigdir}/pythondeps.sh --requires
-%__python_path	((/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(^%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
+%__python_path	((/lib(64)?/python[[:digit:]]\\.[[:digit:]]([[:digit:]])?/.*\\.(py[oc]?|so))|(^%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$

Maybe just use `+` (assuming that it is supported)? Also, the second part of the match also needs to be modified. I.e.:
```perl
((/lib(64)?/python[[:digit:]]\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(^%{_bindir}/python[[:digit:]]\\.[[:digit:]]+))$
```


> @@ -1,3 +1,3 @@
 %__pythondist_provides	%{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
 %__pythondist_requires	%{_rpmconfigdir}/pythondistdeps.py --requires
-%__pythondist_path		/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(dist.*|egg.*)$
+%__pythondist_path		/lib(64)?/python[[:digit:]]\\.[[:digit:]]([[:digit:]])?/site-packages/[^/]*\\.(dist-info|egg-info|egg-link)$

I'd use `+` here too.

-- 
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/pull/562#pullrequestreview-160574122
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20181001/d02aa149/attachment-0001.html>


More information about the Rpm-maint mailing list