commit:     e7a58393c16d853a165ec56d2637d4c1649ff033
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 21:59:56 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sun Sep 17 00:39:39 2017 +0000
URL:        https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=e7a58393

perl-functions.eclass: Update check_module_version for EAPI6

 eclass/perl-functions.eclass | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

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

Reply via email to