On Thu, 2020-03-26 at 14:13 -0500, William Hubbs wrote:
> There are situations in which downstream overlays need to have versions
> of python which Gentoo no longer supports in the tree.
> 
> Currently, the only way to do this is for the overlay author to fork
> python-utils-r1.eclass. This is highly undesirable since it creates a
> very significant maintenance burden for the overlay author.
> 
> There are a couple of things we can do upstream to make this easier, and
> I think we should do one of them.
> 
> The simplest way would be to apply the following patch.
> In this situation, all the overlay author
> would have to do is adjust the PYTHON_COMPAT_ALLOW_EXTRA_IMPLS variable.
> 
> The other option would be to move _PYTHON_ALL_IMPLS and  the
> implementation of _python_impl_supported to a separate eclass, e.g.
> python-impls-r1.eclass. This eclass could be forked freely downstream
> without worrying about the other python eclasses.
> I will volunteer to do the legwork for this option if we do not like the
> first one.
> 
> I would advocate the first option however since no one has to fork
> anything.
> 
> Thoughts?
> 
> William
> 
> William Hubbs (1):
>   python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
> 
>  eclass/python-utils-r1.eclass | 2 ++
>  1 file changed, 2 insertions(+)
> 

How do you prevent some extra clever Gentoo developer from doing the following
in ::gentoo

  dev-python/foo/foo-1.ebuild:

  # don't have the time to port this right now, patches welcome
  PYTHON_COMPAT_ALLOW_EXTRA_IMPLS=( python3_4 )
  PYTHON_COMPAT=( python3_4 )
  inherit distutils-r1

Furthermore, defining PYTHON_COMPAT_ALLOW_EXTRA_IMPLS is going to break metadata
invariance, causing tons of cache mis-hits. How do you prevent that?

In addition, this will very quickly cause whatever overlay this is being used in
to become invalid. Imagine I have dev-python/foo::gentoo that supports python
3.4 and 3.5 and have dev-python/bar::sony supporting 3.4 and 3.5 sitting in a
hypothetical overlay, which depends on dev-python/foo::gentoo. Now we remove
python 3.4 from ::gentoo in python-utils-r1, and one week later we remove
python3.4 from dev-python/foo::gentoo's PYTHON_COMPAT. Now your dev-
python/bar::sony in conjunction with PYTHON_COMPAT_ALLOW_EXTRA_IMPLS has an
invalid depgraph. How do you wish to resolve this?

I feel like keeping up with ::gentoo is ultimately the better strategy than
trying to add backdoors to eclasses because some overlays are somewhat behind.

Regards
David


Reply via email to