Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 15 Apr 2021 08:24:31
Message-Id: 1618474885.6b9e95b1e5c0903aa4fbaa2beeee2d539a992b0b.juippis@gentoo
1 commit: 6b9e95b1e5c0903aa4fbaa2beeee2d539a992b0b
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 15 08:21:25 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 15 08:21:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b9e95b1
7
8 optfeature.eclass: add pkg_postinst() { } to example code snippets
9
10 - to make it more understandable where optfeature is supposed to be used.
11
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 eclass/optfeature.eclass | 4 ++++
15 1 file changed, 4 insertions(+)
16
17 diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass
18 index b558e8c9084..06776da922d 100644
19 --- a/eclass/optfeature.eclass
20 +++ b/eclass/optfeature.eclass
21 @@ -52,11 +52,13 @@ _OPTFEATURE_DOHEADER=true
22 # two optfeature calls. Then a custom header is set that is going to be
23 # displayed in case dev-db/a or dev-db/b are not installed.
24 # @CODE
25 +# pkg_postinst() {
26 # optfeature "foo support" app-misc/foo
27 # optfeature "bar support" app-misc/bar
28 # optfeature_header "Install optional database backends:"
29 # optfeature "a DB backend" dev-db/a
30 # optfeature "b DB backend" dev-db/b
31 +# }
32 # @CODE
33 optfeature_header() {
34 debug-print-function ${FUNCNAME} "$@"
35 @@ -74,9 +76,11 @@ optfeature_header() {
36 # app-misc/bar or app-misc/baz[bar] for optional bar support
37 # and either both app-misc/a and app-misc/b or app-misc/c for alphabet support.
38 # @CODE
39 +# pkg_postinst() {
40 # optfeature "foo support" app-misc/foo
41 # optfeature "bar support" app-misc/bar app-misc/baz[bar]
42 # optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c
43 +# }
44 # @CODE
45 optfeature() {
46 debug-print-function ${FUNCNAME} "$@"