Dnia 2015-07-25, o godz. 22:25:57
Jason Zaman <perfin...@gentoo.org> napisał(a):

> On Sat, Jul 25, 2015 at 12:37:43PM +0200, Michał Górny wrote:
> > Ban calling python3{,-config} when python2 is used, and the other way
> > around. While this will not prevent configure scripts from finding the
> > other Python version, it will cause them to fail eventually trying to
> > use it. Currently those attempt were able to pass through thanks to
> > python-config providing python{2,3} symlinks.
> 
> you mean eselect providing.

Yes, you are correct.

> > ---
> >  eclass/python-utils-r1.eclass | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> > index 69d3262..2584f3e 100644
> > --- a/eclass/python-utils-r1.eclass
> > +++ b/eclass/python-utils-r1.eclass
> > @@ -847,11 +847,13 @@ python_wrapper_setup() {
> >             local EPYTHON PYTHON
> >             python_export "${impl}" EPYTHON PYTHON
> >  
> > -           local pyver
> > +           local pyver pyother
> >             if python_is_python3; then
> >                     pyver=3
> > +                   pyother=2
> >             else
> >                     pyver=2
> > +                   pyother=3
> >             fi
> >  
> >             # Python interpreter
> > @@ -865,7 +867,7 @@ python_wrapper_setup() {
> >             cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || 
> > die
> >             chmod +x "${workdir}/bin/python" 
> > "${workdir}/bin/python${pyver}" || die
> >  
> > -           local nonsupp=()
> > +           local nonsupp=( "python${pyother}" "python${pyother}-config" )
> 
> I have had basically this exact patch locally for a few days since we
> talked about it and it hasnt been a problem yet but is not very much
> testing. I was wondering if perhaps this should be a qawarn for a while
> first instead of banning immediately?

Well, the problem is that those wrappers are more likely to be called
indirectly than directly by ebuilds, so we'd need some hacky magic to
pass warnings from within the wrapper to the ebuild. It doesn't really
fit the eclass design to receive them afterwards.

> >             # CPython-specific
> >             if [[ ${EPYTHON} == python* ]]; then
> > -- 
> > 2.4.6

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

Attachment: pgp8rvaIf8qtV.pgp
Description: OpenPGP digital signature

Reply via email to