diff options
author | Kent Fredric <kentnl@gentoo.org> | 2016-09-17 17:35:06 +1200 |
---|---|---|
committer | Kent Fredric <kentnl@gentoo.org> | 2016-09-18 06:57:26 +1200 |
commit | a5e7622671faf8e8ee6211e5d9099fc294479992 (patch) | |
tree | 1fc1fe3a43d9447281c1b7ba3a8b005392f6ae3b /dev-lang | |
parent | dev-lang/perl: Restore missing call to check_rebuild (diff) | |
download | gentoo-a5e7622671faf8e8ee6211e5d9099fc294479992.tar.gz gentoo-a5e7622671faf8e8ee6211e5d9099fc294479992.tar.bz2 gentoo-a5e7622671faf8e8ee6211e5d9099fc294479992.zip |
dev-lang/perl: use REPLACING_VERSIONS instead of has_version where possible
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/perl/perl-5.24.0-r1.ebuild | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/dev-lang/perl/perl-5.24.0-r1.ebuild b/dev-lang/perl/perl-5.24.0-r1.ebuild index f984f969ac78..e4d7ab297bea 100644 --- a/dev-lang/perl/perl-5.24.0-r1.ebuild +++ b/dev-lang/perl/perl-5.24.0-r1.ebuild @@ -68,7 +68,13 @@ dual_scripts() { } check_rebuild() { - if has_version "<dev-lang/perl-${SHORT_PV}" ; then + # Fresh install + if [[ -z "${REPLACING_VERSIONS}" ]]; then + return 0; + # Major Upgrade + # doesn't matter if there's multiple copies, it still needs a rebuild + # if the string is anything other than "5.CURRENTMAJOR" + elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then echo "" ewarn "UPDATE THE PERL MODULES:" ewarn "After updating dev-lang/perl the installed Perl modules" @@ -84,17 +90,18 @@ check_rebuild() { ewarn "You should then call perl-cleaner to clean up any old files and trigger any" ewarn "remaining rebuilds portage may have missed." ewarn "Use: perl-cleaner --all" - elif has_version dev-lang/perl ; then - if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \ - ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \ - ( use debug && ! has_version dev-lang/perl[debug] ) || \ - ( ! use debug && has_version dev-lang/perl[debug] ) ; then - echo "" - ewarn "TOGGLED USE-FLAGS WARNING:" - ewarn "You changed one of the use-flags ithreads or debug." - ewarn "You must rebuild all perl-modules installed." - ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl" - fi + return 0; + + # Reinstall w/ USE Change + elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \ + ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \ + ( use debug && ! has_version dev-lang/perl[debug] ) || \ + ( ! use debug && has_version dev-lang/perl[debug] ) ; then + echo "" + ewarn "TOGGLED USE-FLAGS WARNING:" + ewarn "You changed one of the use-flags ithreads or debug." + ewarn "You must rebuild all perl-modules installed." + ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl" fi } |