Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH 06/10] Ban dohtml for EAPI 7
Date: Mon, 26 Feb 2018 16:01:16
Message-Id: 20180226155942.9148-7-mgorny@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 00/10] EAPI 7, part one by "Michał Górny"
1 Bug: https://bugs.gentoo.org/show_bug.cgi?id=520546
2 ---
3 bin/eapi.sh | 6 +++++-
4 bin/ebuild-helpers/dohtml | 7 ++++++-
5 2 files changed, 11 insertions(+), 2 deletions(-)
6
7 diff --git a/bin/eapi.sh b/bin/eapi.sh
8 index f3ba0da6e..964e19d7d 100644
9 --- a/bin/eapi.sh
10 +++ b/bin/eapi.sh
11 @@ -52,8 +52,12 @@ ___eapi_has_einstall() {
12 [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
13 }
14
15 +___eapi_has_dohtml() {
16 + [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
17 +}
18 +
19 ___eapi_has_dohtml_deprecated() {
20 - [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
21 + [[ ${1-${EAPI-0}} == 6 ]]
22 }
23
24 ___eapi_has_docompress() {
25 diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml
26 index 860d4abbe..49d6a6dfb 100755
27 --- a/bin/ebuild-helpers/dohtml
28 +++ b/bin/ebuild-helpers/dohtml
29 @@ -1,9 +1,14 @@
30 #!/bin/bash
31 -# Copyright 2009-2013 Gentoo Foundation
32 +# Copyright 2009-2018 Gentoo Foundation
33 # Distributed under the terms of the GNU General Public License v2
34
35 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
36
37 +if ! ___eapi_has_dohtml; then
38 + die "'${0##*/}' has been banned for EAPI '$EAPI'"
39 + exit 1
40 +fi
41 +
42 if ___eapi_has_dohtml_deprecated; then
43 eqawarn "'${0##*/}' is deprecated in EAPI '$EAPI'"
44 fi
45 --
46 2.16.2