Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/g-cpan/
Date: Sun, 03 Jul 2022 22:39:35
Message-Id: 1656887962.6103e4eac8e4a07187cccc324a198a8ad0705c4e.sam@gentoo
1 commit: 6103e4eac8e4a07187cccc324a198a8ad0705c4e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 22:39:22 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 22:39:22 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6103e4ea
7
8 app-portage/g-cpan: add ewarn for recreating overlay/ebuilds
9
10 Bug: https://bugs.gentoo.org/819513
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../g-cpan/{g-cpan-0.18.0.ebuild => g-cpan-0.18.0-r1.ebuild} | 12 ++++++++++++
14 app-portage/g-cpan/g-cpan-9999.ebuild | 12 ++++++++++++
15 2 files changed, 24 insertions(+)
16
17 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
18 similarity index 76%
19 rename from app-portage/g-cpan/g-cpan-0.18.0.ebuild
20 rename to app-portage/g-cpan/g-cpan-0.18.0-r1.ebuild
21 index 245e333b5463..d37683277b73 100644
22 --- a/app-portage/g-cpan/g-cpan-0.18.0.ebuild
23 +++ b/app-portage/g-cpan/g-cpan-0.18.0-r1.ebuild
24 @@ -57,7 +57,19 @@ src_install() {
25 keepdir /var/log/g-cpan
26 }
27
28 +pkg_preinst() {
29 + has_version "<app-portage/g-cpan-0.18.0-r1" && HAD_EAPI5_GCPAN=1
30 +}
31 +
32 pkg_postinst() {
33 + if [[ ${HAD_EAPI5_GCPAN:-0} -eq 1 ]] ; then
34 + ewarn "Please re-create your overlay with generated g-cpan ebuilds!"
35 + ewarn "The old ebuilds will use EAPI 5 and be incompatible with newer"
36 + ewarn "Perl eclass changes. This newer version of g-cpan (0.18.0+)"
37 + ewarn "generates EAPI 8 ebuilds without this problem, but it cannot"
38 + ewarn "change existing ebuilds. See bug #819513."
39 + fi
40 +
41 elog "If you want to use g-cpan as non root user you may wish to adjust"
42 elog "the permissions on /var/tmp/g-cpan or add users to the portage group."
43 elog "Please note that some CPAN packages need additional manual"
44
45 diff --git a/app-portage/g-cpan/g-cpan-9999.ebuild b/app-portage/g-cpan/g-cpan-9999.ebuild
46 index 245e333b5463..d37683277b73 100644
47 --- a/app-portage/g-cpan/g-cpan-9999.ebuild
48 +++ b/app-portage/g-cpan/g-cpan-9999.ebuild
49 @@ -57,7 +57,19 @@ src_install() {
50 keepdir /var/log/g-cpan
51 }
52
53 +pkg_preinst() {
54 + has_version "<app-portage/g-cpan-0.18.0-r1" && HAD_EAPI5_GCPAN=1
55 +}
56 +
57 pkg_postinst() {
58 + if [[ ${HAD_EAPI5_GCPAN:-0} -eq 1 ]] ; then
59 + ewarn "Please re-create your overlay with generated g-cpan ebuilds!"
60 + ewarn "The old ebuilds will use EAPI 5 and be incompatible with newer"
61 + ewarn "Perl eclass changes. This newer version of g-cpan (0.18.0+)"
62 + ewarn "generates EAPI 8 ebuilds without this problem, but it cannot"
63 + ewarn "change existing ebuilds. See bug #819513."
64 + fi
65 +
66 elog "If you want to use g-cpan as non root user you may wish to adjust"
67 elog "the permissions on /var/tmp/g-cpan or add users to the portage group."
68 elog "Please note that some CPAN packages need additional manual"