summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2020-12-16 13:29:35 -0500
committerAaron Bauman <bman@gentoo.org>2020-12-16 15:33:01 -0500
commit5cd3a39e4699279038b3f838aef51a49ea245ebd (patch)
tree99721f90c4b699e93bed095e0e9222de81f101ca /eclass
parentdev-libs/miniz: drop old (diff)
downloadgentoo-5cd3a39e4699279038b3f838aef51a49ea245ebd.tar.gz
gentoo-5cd3a39e4699279038b3f838aef51a49ea245ebd.tar.bz2
gentoo-5cd3a39e4699279038b3f838aef51a49ea245ebd.zip
eclass/alternatives: fixup documentation
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/alternatives.eclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
index 6ee984458fd6..108a55af8112 100644
--- a/eclass/alternatives.eclass
+++ b/eclass/alternatives.eclass
@@ -74,14 +74,17 @@ alternatives_auto_makesym() {
alternatives_makesym ${SYMLINK} ${ALT}
}
+# @FUNCTION: alternatives_makesym
+# @USAGE: alternatives_makesym <resulting symlink> [alternative targets..]
+# @DESCRIPTION:
+# make sure it is in the prefix, allow it already to be in the prefix
+
alternatives_makesym() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
local ALTERNATIVES=""
local SYMLINK=""
local alt pref
- # usage: alternatives_makesym <resulting symlink> [alternative targets..]
- # make sure it is in the prefix, allow it already to be in the prefix
SYMLINK=${EPREFIX}/${1#${EPREFIX}}
# this trick removes the trailing / from ${ROOT}
pref=${ROOT%/}
@@ -126,6 +129,7 @@ alternatives_makesym() {
# @FUNCTION: alernatives-pkg_postinst
# @DESCRIPTION:
# The alternatives pkg_postinst, this function will be exported
+
alternatives_pkg_postinst() {
if [ -n "${ALTERNATIVES}" -a -n "${SOURCE}" ]; then
alternatives_makesym ${SOURCE} ${ALTERNATIVES}
@@ -135,6 +139,7 @@ alternatives_pkg_postinst() {
# @FUNCTION: alternatives_pkg_postrm
# @DESCRIPTION:
# The alternatives pkg_postrm, this function will be exported
+
alternatives_pkg_postrm() {
if [ -n "${ALTERNATIVES}" -a -n "${SOURCE}" ]; then
alternatives_makesym ${SOURCE} ${ALTERNATIVES}