public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Francesco Riosa <vivo75@gmail.com>
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:16:20 +0100	[thread overview]
Message-ID: <ab752430-f1b1-bd88-045c-4710e7985840@gmail.com> (raw)
In-Reply-To: <CAAr7Pr-LH4wGsoR_fbgztQ6RqBY4WrSvOcd8JgNoBULpLtfb-w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4454 bytes --]



On 16/01/2018 01:40, Alec Warner wrote:
>
>
> On Mon, Jan 15, 2018 at 7:05 PM, Francesco Riosa <vivo75@gmail.com
> <mailto:vivo75@gmail.com>> wrote:
>
>
>
>     On 15/01/2018 18:07, Mike Gilbert wrote:
>     > On Mon, Jan 15, 2018 at 10:27 AM, Francesco Riosa
>     <vivo75@gmail.com <mailto:vivo75@gmail.com>> wrote:
>     >> 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)
>     >>
>     >> 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.
>     > I like the idea to inject values into PYTHON_COMPAT instead of
>     > overriding it completely. I'm pretty sure this can/should be
>     > implemented in the eclass without touching ebuilds.
>     In my mind that was to leave ebuilds developers the ability to opt
>     out,
>     but well that could also be done in the eclasses.
>     Opt out could be beneficial for packages that only support python 2.7,
>     or where there are known and documented problems with different python
>     versions.
>     >
>     > I'm not sure I really like the idea of affecting the other metadata
>     > variables. I can see your point about wanting to remove python
>     > versions that would otherwise satisfy dependencies. If metadata is
>     > modified this way, it would definitely be "unsupported".
>     I've not tought about remove python versions, only add them
>     (beneficial
>     for users that like to use experimental python versions)
>     However the supported python version are translated and build
>     important
>     cached variables IUSE, DEPEND, etc. so there is no way to cleanly
>     modify
>     those variable after the cache has been generated.
>     The only viable option is to regenerate, update or delete it.
>
>     >
>     > As far as implementation, you would probably need to write the
>     patches for this.
>     If there is consensus that's not a problem, cannot guarantee to be
>     fast
>     however
>     >
>     > Also, I expect the QA team might have some objections, so you
>     may want
>     > to discuss it with them (especially mgorny) before spending too much
>     > time on it.
>     I'd like to hear mgorny opinions but that should be a more extended
>     decision than only QA and the python eclasses developer(s).
>     If nothing else because deciding that sometimes may be good to let the
>     user break the cache is a global decision and documentation need to be
>     added.
>
>
> I'm seeing less value in this being a 'cache-breaking' exercise and
> more value in it simply being a custom eclass.
>
> If you hoist the eclass into an overlay and modify it (e.g. to set the
> var and get the deps you want) the caching
> all works out fine.
>
> 1. The source of the data is the hoisted eclass.
> 2. The eclass mtime changed.
> 3. package managers can see that and update cache metadata for
> inheriting ebuilds.
> 4. Bonus, once the cache is generated we have a valid means to see if
> the cache remains valid.
> 5. Double bonus, any ebuilds not inheriting the eclass are unaffected.
>
> I'm not sure why this is so onerous.
>
> -A
That's a good idea, in the past I've failed to completely understand how
portage inherit eclasses in overlays, but if I can figure that out
probably this could be a solution.
Also depending from the magnitude of changes the four python eclasses
need and the correlated maintenance burden.

[-- Attachment #2: Type: text/html, Size: 7199 bytes --]

  reply	other threads:[~2018-01-16 13:16 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 [this message]
2018-01-16  7:57 ` Michał Górny
2018-01-16 13:09   ` Francesco Riosa
2018-01-16 13:20     ` Michał Górny

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=ab752430-f1b1-bd88-045c-4710e7985840@gmail.com \
    --to=vivo75@gmail.com \
    --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