commit: 6103e4eac8e4a07187cccc324a198a8ad0705c4e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Jul 3 22:39:22 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jul 3 22:39:22 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6103e4ea
app-portage/g-cpan: add ewarn for recreating overlay/ebuilds Bug: https://bugs.gentoo.org/819513 Signed-off-by: Sam James <sam <AT> gentoo.org> .../g-cpan/{g-cpan-0.18.0.ebuild => g-cpan-0.18.0-r1.ebuild} | 12 ++++++++++++ app-portage/g-cpan/g-cpan-9999.ebuild | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/app-portage/g-cpan/g-cpan-0.18.0.ebuild b/app-portage/g-cpan/g-cpan-0.18.0-r1.ebuild similarity index 76% rename from app-portage/g-cpan/g-cpan-0.18.0.ebuild rename to app-portage/g-cpan/g-cpan-0.18.0-r1.ebuild index 245e333b5463..d37683277b73 100644 --- a/app-portage/g-cpan/g-cpan-0.18.0.ebuild +++ b/app-portage/g-cpan/g-cpan-0.18.0-r1.ebuild @@ -57,7 +57,19 @@ src_install() { keepdir /var/log/g-cpan } +pkg_preinst() { + has_version "<app-portage/g-cpan-0.18.0-r1" && HAD_EAPI5_GCPAN=1 +} + pkg_postinst() { + if [[ ${HAD_EAPI5_GCPAN:-0} -eq 1 ]] ; then + ewarn "Please re-create your overlay with generated g-cpan ebuilds!" + ewarn "The old ebuilds will use EAPI 5 and be incompatible with newer" + ewarn "Perl eclass changes. This newer version of g-cpan (0.18.0+)" + ewarn "generates EAPI 8 ebuilds without this problem, but it cannot" + ewarn "change existing ebuilds. See bug #819513." + fi + elog "If you want to use g-cpan as non root user you may wish to adjust" elog "the permissions on /var/tmp/g-cpan or add users to the portage group." elog "Please note that some CPAN packages need additional manual" diff --git a/app-portage/g-cpan/g-cpan-9999.ebuild b/app-portage/g-cpan/g-cpan-9999.ebuild index 245e333b5463..d37683277b73 100644 --- a/app-portage/g-cpan/g-cpan-9999.ebuild +++ b/app-portage/g-cpan/g-cpan-9999.ebuild @@ -57,7 +57,19 @@ src_install() { keepdir /var/log/g-cpan } +pkg_preinst() { + has_version "<app-portage/g-cpan-0.18.0-r1" && HAD_EAPI5_GCPAN=1 +} + pkg_postinst() { + if [[ ${HAD_EAPI5_GCPAN:-0} -eq 1 ]] ; then + ewarn "Please re-create your overlay with generated g-cpan ebuilds!" + ewarn "The old ebuilds will use EAPI 5 and be incompatible with newer" + ewarn "Perl eclass changes. This newer version of g-cpan (0.18.0+)" + ewarn "generates EAPI 8 ebuilds without this problem, but it cannot" + ewarn "change existing ebuilds. See bug #819513." + fi + elog "If you want to use g-cpan as non root user you may wish to adjust" elog "the permissions on /var/tmp/g-cpan or add users to the portage group." elog "Please note that some CPAN packages need additional manual"