Re: [gentoo-dev] [PATCH 01/12] toolchain.eclass: remove EAPI 5 and 6

2022-02-01 Thread Andreas K. Huettel
> Dilfridge had a proposal to ensure 3/6/12 month old systems could still
> upgrade, and I'm wondering if this could break those systems.
> 
> There are 3 commits in the last year that finally removed the EAPI 5/6
> toolchain consumers:
> 486b77ab8d28c5bfd5a4bdfc5f9a5f432ffde563
> b0a39e54065f7eda2dfc719ec05e270fa7e23e38
> 26f684adecb5b9135f9eba9f1b63c83e3d5e5722
> 
> The latest of those was in September 2021.
> 
> Do we need to wait X months after those removals, to be able to commit
> this change?

Hmm. Portage saves and reuses the ebuild environment, so each installed 
package has its phases and related eclass code stored.

Which means this is probably fine, since
1) after syncing, the ebuilds are gone, so you'll never be able to rebuild
the consumer
2) and unmerging the consumer is done using the saved environment.

More opinions welcome...

-- 
Andreas K. Hüttel
dilfri...@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 01/12] toolchain.eclass: remove EAPI 5 and 6

2022-02-01 Thread Robin H. Johnson
At a technical level, it looks fine.

But I want to clarify interaction for old systems.

Dilfridge had a proposal to ensure 3/6/12 month old systems could still
upgrade, and I'm wondering if this could break those systems.

There are 3 commits in the last year that finally removed the EAPI 5/6
toolchain consumers:
486b77ab8d28c5bfd5a4bdfc5f9a5f432ffde563
b0a39e54065f7eda2dfc719ec05e270fa7e23e38
26f684adecb5b9135f9eba9f1b63c83e3d5e5722

The latest of those was in September 2021.

Do we need to wait X months after those removals, to be able to commit
this change?

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robb...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH 01/12] toolchain.eclass: remove EAPI 5 and 6

2022-01-29 Thread Sam James


> On 29 Jan 2022, at 17:31, David Seifert  wrote:
> 
> Signed-off-by: David Seifert 
> --

series lgtm

Best,
sam


signature.asc
Description: Message signed with OpenPGP


Re: [gentoo-dev] [PATCH 01/12] toolchain.eclass: remove EAPI 5 and 6

2022-01-29 Thread Michał Górny
The series LGTM from visual review.  Note that I haven't verified
the variable moves in wider context.

-- 
Best regards,
Michał Górny




[gentoo-dev] [PATCH 01/12] toolchain.eclass: remove EAPI 5 and 6

2022-01-29 Thread David Seifert
Signed-off-by: David Seifert 
---
 eclass/toolchain.eclass | 110 +++-
 1 file changed, 40 insertions(+), 70 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 61718f0d9a0..741b6dfbbcc 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -4,7 +4,7 @@
 # @ECLASS: toolchain.eclass
 # @MAINTAINER:
 # Toolchain Ninjas 
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Common code for sys-devel/gcc ebuilds
 
 DESCRIPTION="The GNU Compiler Collection"
@@ -31,7 +31,6 @@ fi
 FEATURES=${FEATURES/multilib-strict/}
 
 case ${EAPI} in
-   5|6) inherit eapi7-ver eutils ;;
7) inherit eutils ;;
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -129,16 +128,6 @@ LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ 
gcc-runtime-library-excepti
 IUSE="test vanilla +nls"
 RESTRICT="!test? ( test )"
 
-tc_supports_dostrip() {
-   case ${EAPI} in
-   5|6) return 1 ;;
-   7|8) return 0 ;;
-   *) die "Update apply_patches() for ${EAPI}." ;;
-   esac
-}
-
-tc_supports_dostrip || RESTRICT+=" strip" # cross-compilers need controlled 
stripping
-
 TC_FEATURES=()
 
 tc_has_feature() {
@@ -146,21 +135,21 @@ tc_has_feature() {
 }
 
 if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
-   IUSE+=" debug +cxx +nptl" TC_FEATURES+=(nptl)
+   IUSE+=" debug +cxx +nptl" TC_FEATURES+=( nptl )
[[ -n ${PIE_VER} ]] && IUSE+=" nopie"
[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
-   IUSE+=" +fortran" TC_FEATURES+=(fortran)
+   IUSE+=" +fortran" TC_FEATURES+=( fortran )
IUSE+=" doc hardened multilib objc"
-   tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=(gcj)
+   tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=( gcj )
IUSE+=" pgo"
-   IUSE+=" objc-gc" TC_FEATURES+=(objc-gc)
+   IUSE+=" objc-gc" TC_FEATURES+=( objc-gc )
IUSE+=" libssp objc++"
IUSE+=" +openmp"
tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
tc_version_is_at_least 4.7 && IUSE+=" go"
# sanitizer support appeared in gcc-4.8, but > S + SRC_URI essentials <<
@@ -447,25 +432,9 @@ toolchain_src_unpack() {
 
 #>> src_prepare <<
 
-# 'epatch' is not available in EAPI=7. Abstract away patchset application
-# until we eventually get all gcc ebuilds on EAPI=7 or later.
-tc_apply_patches() {
-   [[ ${#@} -lt 2 ]] && die "usage: tc_apply_patches  
"
-
-   einfo "$1"; shift
-
-   case ${EAPI} in
-   # Note: even for EAPI=6 we used 'epatch' semantics. To avoid
-   # breaking existing ebuilds use 'eapply' only in EAPI=7 or 
later.
-   5|6) epatch "$@" ;;
-   7|8) eapply "$@" ;;
-   *) die "Update apply_patches() for ${EAPI}." ;;
-   esac
-}
-
 toolchain_src_prepare() {
export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
-   cd "${S}"
+   cd "${S}" || die
 
do_gcc_gentoo_patches
do_gcc_PIE_patches
@@ -475,11 +444,7 @@ toolchain_src_prepare() {
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, commit 
${EGIT_VERSION}"
fi
 
-   case ${EAPI} in
-   5) epatch_user;;
-   6|7|8) eapply_user ;;
-   *) die "Update toolchain_src_prepare() for ${EAPI}." ;;
-   esac
+   eapply_user
 
if ( tc_version_is_at_least 4.8.2 || _tc_use_if_iuse hardened ) \
   && ! use vanilla ; then
@@ -490,7 +455,7 @@ toolchain_src_prepare() {
# since we configure with just one --libdir, we can't use that
# (as gcc itself takes care of building multilibs).  #435728
find "${S}" -name Makefile.in \
-   -exec sed -i 
'/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} +
+   -exec sed -i 
'/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} + || die
 
setup_multilib_osdirnames
gcc_version_patch
@@ -532,10 +497,11 @@ toolchain_src_prepare() {
|| eerror "Please file a bug about this"
eend $?
done
-   sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828
+   sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk || die #215828
 
# Prevent new texinfo from breaking old versions (see #198182, #464008)
-   tc_apply_patches "Remove texinfo (bug #198182, bug #464008)" 
"${FILESDIR}"/gcc-configure-texinfo.patch
+   einfo "Remove texinfo (bug #198182, bug #464008)"
+   eapply "${FILESDIR}"/gcc-configure-texinfo.patch
 
# >=gcc-4
if [[ -x contrib/gcc_update ]] ; then
@@ -550,7 +516,8 @@ toolchain_src_prepare() {
 do_gcc_gentoo_patches() {
if ! use vanilla ; then
if [[ -n ${PATCH_VER} ]] ; then
-   tc_apply_patches "Applying Gentoo patches ..." 
"${WORKDIR}"/patch/*.patch
+   einfo "Applying Gentoo patches ..."
+