On 28. 04. 20 11:00, Petr Viktorin wrote:
I finally got around to this mail...
Thanks.
> 7) Support arbitrary names. Only provide the given name and
nothing else if
> not "recognized".
Is that better than erroring out when something is not recognized?
The "not recognized" part is hard to define.
With errors, we need to have 3 categories:
- "recognized" and should provide more
(e.g. python3-foo -> python3-foo, python-foo)
- "recognized" but should not provide more
(e.g. python2-foo -> python2-foo)
- "not recognized" and should error
(e.g. llama -> error)
While with "meh" attitude, this is simpler to implement:
- should provide more
(e.g. python3-foo -> python3-foo, python-foo)
- should not provide more
(e.g. python2-foo -> python2-foo)
(e.g. llama -> llama)
This is also simpler with provides generator (when we cannot error out with
arbitrary package names, so we currently need to pre-filter the arguments before
using them).
And the benefit of erroring out with arbitrary names is very slow. It tells the
packager that there is no way to provide additional names for "llama" and hence
they SHOULD use regular Provides, but there is no harm when using this macro.
> As always, this leaves us with the name problem, but I'd very
much like to use
> %python_provides (note the s). The only problem I see is that it is likely to
> be mistaken for the old one, but IMHO it shouldn't really hurt that much.
I guess something like %py_provides would also work, and maybe fit more nicely
with the new generation of macros. Do you like full "python" prefix?
But that's bikeshedding.
%py_provides is actually much better:
- shorter, yet still understandable
- easily distinguishable from %python_provide
Thanks.
> Usage example:
>
> %package -n python3-setuptools
> %python_provides python3-pkg_resources
>
> Resulting provides:
>
> python3-setuptools = 46.6.6-6.fc33
> python-setuptools = 46.6.6-6.fc33
> python39-pkg_resources = 46.6.6-6.fc33
> python3-pkg_resources = 46.6.6-6.fc33
> python-pkg_resources = 46.6.6-6.fc33
> python39-pkg_resources = 46.6.6-6.fc33
I assume you meant "python39-setuptools" there.
Copy paste problems. Full list as meant:
python3-setuptools = 46.6.6-6.fc33
python-setuptools = 46.6.6-6.fc33
python39-setuptools = 46.6.6-6.fc33
python3-pkg_resources = 46.6.6-6.fc33
python-pkg_resources = 46.6.6-6.fc33
python39-pkg_resources = 46.6.6-6.fc33
> What do you think?
Love it! I haven't thought about how feasible it is to implement, but I trust
you on that.
I will try and we'll see.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok