commit: cbe923acdb6fae689cdaedc7f00901cd00e2557a Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed May 12 17:38:16 2021 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon May 24 04:52:34 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cbe923ac
Make doconf, doenvd, doheader & doinitd ignore ins/exeopts in EAPI 8 Bug: https://bugs.gentoo.org/657580 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> bin/eapi.sh | 16 ++++++++++++++++ bin/ebuild-helpers/doconfd | 8 +++++++- bin/ebuild-helpers/doenvd | 8 +++++++- bin/ebuild-helpers/doheader | 8 +++++++- bin/ebuild-helpers/doinitd | 9 ++++++++- 5 files changed, 45 insertions(+), 4 deletions(-) diff --git a/bin/eapi.sh b/bin/eapi.sh index d3cac807c..eea8d0d0f 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -266,6 +266,22 @@ ___eapi_usev_has_second_arg() { [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] } +___eapi_doconfd_respects_insopts() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_doenvd_respects_insopts() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_doheader_respects_insopts() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + +___eapi_doinitd_respects_exeopts() { + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]] +} + # OTHERS ___eapi_enables_failglob_in_global_scope() { diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd index 15ad980f3..572629a54 100755 --- a/bin/ebuild-helpers/doconfd +++ b/bin/ebuild-helpers/doconfd @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 @@ -13,4 +13,10 @@ export _E_INSDESTTREE_='/etc/conf.d/' if ___eapi_has_DESTTREE_INSDESTTREE; then export INSDESTTREE=${_E_INSDESTTREE_} fi + +if ! ___eapi_doconfd_respects_insopts; then + export INSOPTIONS=-m0644 + export DIROPTIONS="" +fi + exec doins "$@" diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd index f14b95104..f1310c848 100755 --- a/bin/ebuild-helpers/doenvd +++ b/bin/ebuild-helpers/doenvd @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 @@ -13,4 +13,10 @@ export _E_INSDESTTREE_='/etc/env.d/' if ___eapi_has_DESTTREE_INSDESTTREE; then export INSDESTTREE=${_E_INSDESTTREE_} fi + +if ! ___eapi_doenvd_respects_insopts; then + export INSOPTIONS=-m0644 + export DIROPTIONS="" +fi + exec doins "$@" diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader index aedc2322a..2f21a5a2a 100755 --- a/bin/ebuild-helpers/doheader +++ b/bin/ebuild-helpers/doheader @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 @@ -17,4 +17,10 @@ export _E_INSDESTTREE_='/usr/include/' if ___eapi_has_DESTTREE_INSDESTTREE; then export INSDESTTREE=${_E_INSDESTTREE_} fi + +if ! ___eapi_doheader_respects_insopts; then + export INSOPTIONS=-m0644 + export DIROPTIONS="" +fi + exec doins "$@" diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd index a216d9827..1863aedac 100755 --- a/bin/ebuild-helpers/doinitd +++ b/bin/ebuild-helpers/doinitd @@ -1,11 +1,18 @@ #!/bin/bash -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 + if [[ $# -lt 1 ]] ; then source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 __helpers_die "${0##*/}: at least one argument needed" exit 1 fi +if ! ___eapi_doinitd_respects_exeopts; then + export EXEOPTIONS=-m0755 + export DIROPTIONS="" +fi + _E_EXEDESTTREE_='/etc/init.d/' exec doexe "$@"
