summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2017-09-17 09:59:56 +1200
committerKent Fredric <kentnl@gentoo.org>2017-09-17 12:39:39 +1200
commite7a58393c16d853a165ec56d2637d4c1649ff033 (patch)
tree11c9081058db3fb66e8f79e994a52cea4409d58c /eclass
parentperl-functions.eclass: sync duallife scripts implementation from ::gentoo (diff)
downloadperl-overlay-e7a58393c16d853a165ec56d2637d4c1649ff033.tar.gz
perl-overlay-e7a58393c16d853a165ec56d2637d4c1649ff033.tar.bz2
perl-overlay-e7a58393c16d853a165ec56d2637d4c1649ff033.zip
perl-functions.eclass: Update check_module_version for EAPI6
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-functions.eclass22
1 files changed, 21 insertions, 1 deletions
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e37cf1e53..da444735b 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -57,7 +57,7 @@ perl_diagnostics() {
eerror
}
-perl_check_module_version() {
+_perl_check_module_version_eapi5() {
local REAL_PV
local gpmv="$(type -p gentoo-perlmod-version.pl)"
[[ -n ${MODULE_VERSION} && -n ${gpmv} && -x ${gpmv} ]] || return
@@ -69,6 +69,26 @@ perl_check_module_version() {
fi
}
+_perl_check_module_version_eapi6() {
+ local REAL_PV
+ local gpmv="$(type -p gentoo-perlmod-version.pl)"
+ [[ -n ${DIST_VERSION} && -n ${gpmv} && -x ${gpmv} ]] || return
+ REAL_PV=$( ${gpmv} --oneshot "${DIST_VERSION}" )
+ if [[ -n ${REAL_PV} && ${REAL_PV} != ${PV} ]] ; then
+ eqawarn "QA Notice: Based on DIST_VERSION=${DIST_VERSION} the ebuild version ${PV} is wrong!"
+ eqawarn " The ebuild version should be ${REAL_PV}"
+ perl_qafatal "version" "${REAL_PV} != ${PV}"
+ fi
+}
+
+perl_check_module_version() {
+ debug-print-function $FUNCNAME "$@"
+ if [[ ${EAPI:-0} == 5 ]]; then
+ _perl_check_module_version_eapi5
+ return
+ fi
+ _perl_check_module_version_eapi6
+}
perlinfo_done=false
# @FUNCTION: perl_set_version