* [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
@ 2016-05-05 21:10 Michał Górny
2016-05-06 13:14 ` Alexander Berntsen
2016-05-20 22:27 ` Michał Górny
0 siblings, 2 replies; 6+ messages in thread
From: Michał Górny @ 2016-05-05 21:10 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
Make helper calls in global scope fatal in all supported EAPIs since
this is the behavior required by PMS and all major offenders are fixed
already.
---
bin/eapi.sh | 4 ----
bin/ebuild.sh | 30 ++++++------------------------
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/bin/eapi.sh b/bin/eapi.sh
index cd3e1a4..a9c56b8 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -166,10 +166,6 @@ ___eapi_helpers_can_die() {
[[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]]
}
-___eapi_disallows_helpers_in_global_scope() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-slot-abi|5|5-hdepend)$ ]]
-}
-
___eapi_unpack_is_case_sensitive() {
[[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend)$ ]]
}
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index f1586b2..5b3146d 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -59,34 +59,16 @@ else
# These dummy functions are for things that are likely to be called
# in global scope, even though they are completely useless during
# the "depend" phase.
- for x in diropts docompress exeopts get_KV insopts \
- KV_major KV_micro KV_minor KV_to_int \
- libopts register_die_hook register_success_hook \
- __strip_duplicate_slashes \
- use_with use_enable ; do
- eval "${x}() {
- if ___eapi_disallows_helpers_in_global_scope; then
- die \"\${FUNCNAME}() calls are not allowed in global scope\"
- fi
- }"
- done
- # These dummy functions return false in non-strict EAPIs, in order to ensure that
- # `use multislot` is false for the "depend" phase.
- funcs="use useq usev"
+ funcs="diropts docompress exeopts get_KV insopts
+ KV_major KV_micro KV_minor KV_to_int
+ libopts register_die_hook register_success_hook
+ __strip_duplicate_slashes
+ use useq usev use_with use_enable"
___eapi_has_usex && funcs+=" usex"
___eapi_has_in_iuse && funcs+=" in_iuse"
- for x in ${funcs} ; do
- eval "${x}() {
- if ___eapi_disallows_helpers_in_global_scope; then
- die \"\${FUNCNAME}() calls are not allowed in global scope\"
- else
- return 1
- fi
- }"
- done
# These functions die because calls to them during the "depend" phase
# are considered to be severe QA violations.
- funcs="best_version has_version portageq"
+ funcs+=" best_version has_version portageq"
___eapi_has_master_repositories && funcs+=" master_repositories"
___eapi_has_repository_path && funcs+=" repository_path"
___eapi_has_available_eclasses && funcs+=" available_eclasses"
--
2.8.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
2016-05-05 21:10 [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs Michał Górny
@ 2016-05-06 13:14 ` Alexander Berntsen
2016-05-06 16:52 ` Zac Medico
2016-05-20 22:27 ` Michał Górny
1 sibling, 1 reply; 6+ messages in thread
From: Alexander Berntsen @ 2016-05-06 13:14 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Patch looks OK, but this is hardly an area that I'm very knowledgeable
about, so if anyone else wants to chime in, that would be great. :)
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJXLJjJAAoJENQqWdRUGk8BjqEQALTr4oZiev7SASu7AO91VgNh
63PUABMW9r0VeitKGuFP6HUthm3xk8cmNU44HKO/gZ9IyOkDTO+r+v60E1RbyES7
3nXfoU2vEoYTFiDo+UVvaZN92sJZMZvbU/DPOS3l+C8I7Saep/ZL6sb2556ohHWL
GI0xqy/5kMMNIX99AVCA9UW6APr/ofBHP+bRlkUpHmffbRGYqHpuPoGyYWg2kpWQ
XHKPgydntXRxJu4SCWdPlkD/CSjwEXt367TL60rBi7I7Q1sqZ50Tt731SmA9Z5Su
47NYdKExzphIknZ4l76zsvbFB7rkEhYi0Qz073Hc+Whp0zRgvl2akN/IN1lwTbV8
dIyu2Z3gIjp1I/m4JCdSXkniKKhG10UfCjg+nzX9wXDAhjDI5kzogYO2EkRqdkuV
n5h1ZyhBiYv/9XyIQw/B44kqPTs/QLsUbvIiFPoHEoVJ3iqab39lRW1NLYAjy4ul
TxMlwdSWCCP69JzdES5xp67WV6yBKPrOq/Wu1HO7KOlZkBDpFyz/7hvPRBcTBHTZ
sInLc+RCKhA5OyE2SWNH5NvQKYNqTyA6dpwgSsCvt61DVd908v1rWNMW8SJzj6CW
hOYEXVG85IMveoJD5RN41QWEh/To2ISbTkEiQDaG+z3tYmQ7CvcowBiRNhNQcdOr
lhLs30RL34n95bQoc9Zo
=qHwh
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
2016-05-06 13:14 ` Alexander Berntsen
@ 2016-05-06 16:52 ` Zac Medico
0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2016-05-06 16:52 UTC (permalink / raw
To: gentoo-portage-dev
On 05/06/2016 06:14 AM, Alexander Berntsen wrote:
> Patch looks OK, but this is hardly an area that I'm very knowledgeable
> about, so if anyone else wants to chime in, that would be great. :)
Looks good to me. We could have done this a long time ago, except that
it would have broken the illegal multislot stuff in toolchain packages.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
2016-05-05 21:10 [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs Michał Górny
2016-05-06 13:14 ` Alexander Berntsen
@ 2016-05-20 22:27 ` Michał Górny
2016-06-27 0:07 ` Zac Medico
1 sibling, 1 reply; 6+ messages in thread
From: Michał Górny @ 2016-05-20 22:27 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
On Thu, 5 May 2016 23:10:43 +0200
Michał Górny <mgorny@gentoo.org> wrote:
> Make helper calls in global scope fatal in all supported EAPIs since
> this is the behavior required by PMS and all major offenders are fixed
> already.
> ---
> bin/eapi.sh | 4 ----
> bin/ebuild.sh | 30 ++++++------------------------
> 2 files changed, 6 insertions(+), 28 deletions(-)
Merged now.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
2016-05-20 22:27 ` Michał Górny
@ 2016-06-27 0:07 ` Zac Medico
2016-06-27 5:13 ` Michał Górny
0 siblings, 1 reply; 6+ messages in thread
From: Zac Medico @ 2016-06-27 0:07 UTC (permalink / raw
To: gentoo-portage-dev
On 05/20/2016 03:27 PM, Michał Górny wrote:
> On Thu, 5 May 2016 23:10:43 +0200
> Michał Górny <mgorny@gentoo.org> wrote:
>
>> Make helper calls in global scope fatal in all supported EAPIs since
>> this is the behavior required by PMS and all major offenders are fixed
>> already.
>> ---
>> bin/eapi.sh | 4 ----
>> bin/ebuild.sh | 30 ++++++------------------------
>> 2 files changed, 6 insertions(+), 28 deletions(-)
>
> Merged now.
>
Seems we might need to revert this patch:
https://forums.gentoo.org/viewtopic-t-1047248.html
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs
2016-06-27 0:07 ` Zac Medico
@ 2016-06-27 5:13 ` Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2016-06-27 5:13 UTC (permalink / raw
To: Zac Medico; +Cc: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On Sun, 26 Jun 2016 17:07:09 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> On 05/20/2016 03:27 PM, Michał Górny wrote:
> > On Thu, 5 May 2016 23:10:43 +0200
> > Michał Górny <mgorny@gentoo.org> wrote:
> >
> >> Make helper calls in global scope fatal in all supported EAPIs since
> >> this is the behavior required by PMS and all major offenders are fixed
> >> already.
> >> ---
> >> bin/eapi.sh | 4 ----
> >> bin/ebuild.sh | 30 ++++++------------------------
> >> 2 files changed, 6 insertions(+), 28 deletions(-)
> >
> > Merged now.
> >
>
> Seems we might need to revert this patch:
>
> https://forums.gentoo.org/viewtopic-t-1047248.html
If we revert it, people will stop caring for another year...
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-27 5:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 21:10 [gentoo-portage-dev] [PATCH] ebuild: Extend helper-in-global-scope ban to all EAPIs Michał Górny
2016-05-06 13:14 ` Alexander Berntsen
2016-05-06 16:52 ` Zac Medico
2016-05-20 22:27 ` Michał Górny
2016-06-27 0:07 ` Zac Medico
2016-06-27 5:13 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox