public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: ${PYTHON_COMPAT_ADD} in addition to ${PYTHON_COMPAT_OVERRIDE}
Date: Tue, 16 Jan 2018 14:20:50 +0100	[thread overview]
Message-ID: <1516108850.1598.12.camel@gentoo.org> (raw)
In-Reply-To: <53b73b89-fd12-90a3-cf5a-52718095e6bb@gmail.com>

W dniu wto, 16.01.2018 o godzinie 14∶09 +0100, użytkownik Francesco
Riosa napisał:
> 
> On 16/01/2018 08:57, Michał Górny wrote:
> > W dniu pon, 15.01.2018 o godzinie 16∶27 +0100, użytkownik Francesco
> > Riosa napisał:
> > > In late 2015 ${PYTHON_COMPAT_OVERRIDE} has been standardized and added
> > > to all python eclasses, it's useful for developers that want test and
> > > mark the package for newer versions of python.
> > > 
> > > However (unless I'm missing something) PYTHON_COMPAT_OVERRIDE is not
> > > usable if:
> > > - the user want only python 2.7 and 3.6 (latest) installed
> > >   no python 3.5
> > > - don't want to mess dependencies (the warnings in the eclass are scary)
> > 
> > Because it is not meant to be used for that purpose, and it is not meant
> > to be used by users at all! It's just a quick hack for developer who
> > wants to UNLIKELY(check if package works with implementation X) before
> > he starts the effort on modifying PYTHON_COMPAT in ebuilds.
> 
> supposed that, but at this point I fail to see the benefit versus the
> added complexity in the eclasses, however that's not my business.
> > 
> > > So, what can be done to let the user choose it's preferred python
> > > version(s) without having to build it's own overlay?
> > > 
> > > One solution is to change ebuilds in tree to include a user variable in
> > > the PYTHON* arrays, example:
> > > 
> > > -PYTHON_COMPAT=( python3_{4,5} )
> > > +PYTHON_COMPAT=( python3_{4,5} ${PYTHON_COMPAT_ADD} )
> > > 
> > > if someone want to bet that packages are ok with 3.6/latest (even before
> > > a developer tested it) then add PYTHON_COMPAT_ADD=python3_6 to
> > > /etc/portage/make.conf and run egencache.
> > > 
> > > Indeed biggest problem in changing $PYTHON* variables is that metadata
> > > also change and cache is invalidated.
> > > 
> > > However if the problem is known (*), and if the change to metadata is
> > > stable per "system"/"gentoo repo clone", then the solution to the
> > > problem is easy; just run $(egencache --update -j$(nproc) --repo gentoo)
> > > after each sync.
> > 
> > This won't work. You are wrongly presuming that egencache regenerates
> > cache unconditionally. It does so only if either ebuild or eclass
> > content changed. So it worked for you once because you modified ebuilds
> > and/or eclasses. It won't work when you change PYTHON_COMPAT_ADD.
> > 
> > I haven't checked the Portage details but it may see the metadata change
> > when installing the package. Which means it would install package with
> > unsatisfied dependencies (because it satisfied dependencies from cache),
> > then store the final dependencies and TADAAM, you've got broken
> > depgraph.
> 
> ouch, that basically kill the proposal, unless portage is modified to
> check known cache modifying variables, which isn't something I'd like to
> create.
> > 
> > > The most important thing is that this solution is scriptable and need no
> > > human intervention.
> > 
> > So is gpy-upgrade-impl.
> 
> It seem to do the job, one piece missing is something that monitor
> gentoo repository to see if it has better version (still w/o wanted
> python), an inotify for ebuilds. Suggestions?

None. I think Alec's idea would work better for you.

-- 
Best regards,
Michał Górny



      reply	other threads:[~2018-01-16 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 15:27 [gentoo-dev] RFC: ${PYTHON_COMPAT_ADD} in addition to ${PYTHON_COMPAT_OVERRIDE} Francesco Riosa
2018-01-15 17:07 ` Mike Gilbert
2018-01-16  0:05   ` Francesco Riosa
2018-01-16  0:40     ` Alec Warner
2018-01-16 13:16       ` Francesco Riosa
2018-01-16  7:57 ` Michał Górny
2018-01-16 13:09   ` Francesco Riosa
2018-01-16 13:20     ` Michał Górny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516108850.1598.12.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox