summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
committerDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
commit2cba2db27919bc449ed2a7bf7ed3259c6b96e65f (patch)
treec89a0929ca3e7cc95c737085614214e89450c999 /eclass/savedconfig.eclass
parentxdg.eclass: remove EAPI 5 (diff)
downloadgentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.gz
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.bz2
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.zip
eclass: standardize prologue/epilogue
Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/savedconfig.eclass')
-rw-r--r--eclass/savedconfig.eclass17
1 files changed, 11 insertions, 6 deletions
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index 4681fd25328b..cc5748543078 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: savedconfig.eclass
@@ -30,15 +30,18 @@
# 4. Emerge the package with just USE=savedconfig to get the custom
# build.
-inherit portability
-
-IUSE="savedconfig"
-
case ${EAPI} in
6|7|8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_SAVEDCONFIG_ECLASS} ]]; then
+_SAVEDCONFIG_ECLASS=1
+
+inherit portability
+
+IUSE="savedconfig"
+
# @FUNCTION: save_config
# @USAGE: <config files to save>
# @DESCRIPTION:
@@ -152,4 +155,6 @@ savedconfig_pkg_postinst() {
fi
}
+fi
+
EXPORT_FUNCTIONS pkg_postinst