public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: "Michał Górny" <mgorny@gentoo.org>
Cc: gentoo-portage-dev@lists.gentoo.org, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels
Date: Sat, 14 Nov 2015 22:00:02 +0100	[thread overview]
Message-ID: <22087.41170.234660.154274@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <20151113235916.6f28a650.mgorny@gentoo.org>

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

>>>>> On Fri, 13 Nov 2015, Michał Górny wrote:

> Ok, I recalled the issue I was particularly concerned about.

>   PV="1_beta2"
>   MY_PV="${PV/_/~}"

> This triggers different behavior between bash<=4.2 and bash>=4.3,
> with the latter requiring:

>   PV="1_beta2"
>   MY_PV="${PV/_/\~}"

> (which in turns breaks older). Now, if someone put a conditional on
> BASH_VERSINFO that worked around this discrepancy, introducing
> BASH_COMPAT suddenly breaks it by forcing the old behavior when
> BASH_VERSINFO indicates the new behavior is expected.

> Not saying this is very likely to happen.

Highly unlikely, IMHO. There are several workarounds that are simpler
than making the code conditional on the bash version. For example:

   tilde="~"; MY_PV="${PV/_/${tilde}}"

or:

   MY_PV="${PV/_/$'\x7e'}"

> However, we are clearly violating the idea behind PMS by allowing it
> to happen retroactively.

Not sure. PMS is (and always was) quite clear about which bash version
belongs to which EAPI, so ebuilds have no business of circumventing
this by doing their own version checks.

> However, enabling BASH_COMPAT in EAPI 6 is a good thing. For
> example, because people in EAPI 6 no longer need to be concerned
> about this discrepancy.

Enabling it for EAPI 6 only will lead to the paradoxical situation
that bash will be compatible to 4.2 in EAPI 6, as it should be.
Whereas earlier EAPIs (which should use 3.2 really) will get the
behaviour of bash 4.3 or later instead.

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2015-11-14 21:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  4:39 [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels Mike Frysinger
2015-11-11  6:33 ` Ulrich Mueller
2015-11-11 18:14   ` Mike Frysinger
2015-11-11  9:32 ` Michał Górny
2015-11-11 11:52   ` Ulrich Mueller
2015-11-13 22:59     ` Michał Górny
2015-11-14 21:00       ` Ulrich Mueller [this message]
2015-11-11 18:17   ` Mike Frysinger
2015-11-11 19:42 ` Zac Medico
2015-11-11 20:55   ` Mike Frysinger
2015-11-11 21:04     ` Zac Medico
2015-11-11 21:11       ` Mike Frysinger
2015-11-12  6:33         ` Zac Medico
2015-11-12  6:40           ` Zac Medico
2015-11-13  0:06             ` Mike Frysinger
2015-11-13  0:58               ` Zac Medico
2015-11-13  1:51                 ` Mike Frysinger
2015-11-13  8:12                 ` Ulrich Mueller
2015-11-13 17:18                   ` Zac Medico
2015-11-13  2:07   ` Tim Harder
2015-11-13  2:25     ` Zac Medico
2015-11-13  2:33       ` Tim Harder
2015-11-13  2:38         ` Zac Medico
2015-11-13  2:55     ` Mike Frysinger
2015-11-11 21:00 ` [gentoo-portage-dev] [PATCH v2] " Mike Frysinger
2015-11-12  7:13   ` Zac Medico

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=22087.41170.234660.154274@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    --cc=vapier@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