From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1AAD21384B4 for ; Sat, 28 Nov 2015 00:26:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08A6E21C088; Sat, 28 Nov 2015 00:26:00 +0000 (UTC) Received: from mo4-p05-ob.smtp.rzone.de (mo4-p05-ob.smtp.rzone.de [81.169.146.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9782321C080 for ; Sat, 28 Nov 2015 00:25:58 +0000 (UTC) X-RZG-AUTH: :IW0NeWCpcPchHrcnS4ebzBgQnKHTmUiSF2JlOcyy9p4roSnp5yQo4oJ5cg== X-RZG-CLASS-ID: mo05 Received: from pinacolada.localnet (88-133-183-17.hsi.glasfaser-ostbayern.de [88.133.183.17]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id Z03a25rAS0Pk54i (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 28 Nov 2015 01:25:46 +0100 (CET) From: "Andreas K. Huettel" To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Introducing perl-functions.eclass Date: Sat, 28 Nov 2015 01:25:42 +0100 User-Agent: KMail/1.13.7 (Linux/4.2.3; KDE/4.14.14; x86_64; ; ) Cc: perl@gentoo.org Content-Type: Multipart/Mixed; boundary="Boundary-00=_JSPWWrfKEH9YTrJ" Message-Id: <201511280125.45725.dilfridge@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: e9172b33-99d6-47e3-a37c-97ea2b4b9c05 X-Archives-Hash: adaf33d58d0dade0d8615e0530775609 --Boundary-00=_JSPWWrfKEH9YTrJ Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi all, before we even start implementing EAPI=6 stuff, Perl support will be reorganized a little bit. TL;DR: No need to do anything. :) Longer version: We're going to split all helper functions out of perl-module.eclass into a new eclass, perl-functions.eclass. * perl-functions will export no phases and keep all global variable meddling to a minimum. If you need perl support in a package that has a non-perl build system, this is what you may want to use in the future to get some helpers. * perl-module.eclass will inherit perl-functions, and all things exported by perl-functions are explicitly also part of the API of perl-module (documented in the eclass), so you dont have to explicitly inherit perl-functions in your ebuild as well. perl-module.eclass is the "ready-made solution for CPAN", exporting all required phases. We are only splitting the code into two parts now, but not really changing anything. So, because of abovementioned inheritance all ebuilds should just keep working as usual. Some changes will come later with the introduction of EAPI=6 support. (Boring) Patch attached for completeness. Cheers, Andreas - -- Andreas K. Huettel Gentoo Linux developer dilfridge@gentoo.org http://www.akhuettel.de/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1 iQJ8BAEBCgBmBQJWWPSJXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ0RkJDMzI0NjNBOTIwMDY5MTQ2NkMzNDBF MTM4NkZEN0VGNEI1Nzc5AAoJEOE4b9fvS1d5WIEQALg9JnpzEZ0bhyRitwVkICsb m6ZWBjdQaOIt+QJh530rhprOWUVtmCepIm4zMhbeKGZ9TdGxK0lE7tDn8dYIjiRM ZeMbnixNM502xspQUHZeEW7qsoBHCNfTQb7QpLHq74/qv7HWtPNqGcEOcwnL+9q+ Vbkt8H6iX3IBlXGbsR3G00uXmnBCAKNuno4GImdV6woEDjGewFnmrTQ0d76lAi9K /wm/oNi6p64ibOU+NIQFvVa6CnXy+Tzmk/djgkJUrnoyJkVogm0l3ygDwjnIWk4T lssw6cLQgjqLLiGpcSeV801z2TC7bWBxuZJm5+pIdBFoFd316zcfGUA/cxrbOOkK vlBnmFLG90hU4JmHHZ+voGUB7ZLl3boLVjRv/2zLGxeWPU72dlyr06zWGhOvDChq QHiRATJ0JLlWhqTfdqClAMaUOB6tEA2LXwXZHPenI9eBalC551ywKzaasVTy6Umv 1t+9puTn4Vi+H4eTYg/IAb6jbY6pQe2uXoFScsA0KkC1OHyiqBNvz6LYeUv8N1tS jbgI2jNvA+XggF2WSfmAnz/u0ND0Vg3tNLj/hmjof7iTAneSUjejwvXemptYx4CQ YRwxE167ZbawtXHT+HVJGbT6mQN9g0sdvD7rekRguW1mpCfluq/WPPF2AO76rA1q mTcqAZDgM+G0wBdf1N+m =nyGO -----END PGP SIGNATURE----- --Boundary-00=_JSPWWrfKEH9YTrJ Content-Type: text/x-patch; charset="UTF-8"; name="0001-perl-modules.eclass-Separate-phases-and-helpers-into.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-perl-modules.eclass-Separate-phases-and-helpers-into.patch" =46rom 8a697f9fc2040571df94b5403c4892d7a103b204 Mon Sep 17 00:00:00 2001 =46rom: "Andreas K. Huettel (dilfridge)" Date: Sun, 22 Nov 2015 21:52:23 +0100 Subject: [PATCH] perl-modules.eclass: Separate phases and helpers into two eclasses =2D-- eclass/perl-functions.eclass | 252 +++++++++++++++++++++++++++++++++++++++= ++++ eclass/perl-module.eclass | 230 +-------------------------------------- 2 files changed, 256 insertions(+), 226 deletions(-) create mode 100644 eclass/perl-functions.eclass diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass new file mode 100644 index 0000000..7ba47d1 =2D-- /dev/null +++ b/eclass/perl-functions.eclass @@ -0,0 +1,252 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# @ECLASS: perl-functions.eclass +# @MAINTAINER: +# perl@gentoo.org +# @AUTHOR: +# Seemant Kulleen +# Andreas K. Huettel +# @BLURB: helper functions eclass for perl modules +# @DESCRIPTION: +# The perl-functions eclass is designed to allow easier installation of pe= rl +# modules, and their incorporation into the Gentoo Linux system. +# It provides helper functions, no phases or variable manipulation in +# global scope. + +[[ ${CATEGORY} =3D=3D "perl-core" ]] && inherit alternatives + +case "${EAPI:-0}" in + 5) + ;; + *) + die "EAPI=3D${EAPI} is not supported by perl-functions.eclass" + ;; +esac + +perlinfo_done=3Dfalse + +# @FUNCTION: perl_set_version +# @USAGE: perl_set_version +# @DESCRIPTION: +# Extract version information and installation paths from the current Perl= =20 +# interpreter.=20 +# +# This sets the following variables: PERL_VERSION, SITE_ARCH, SITE_LIB,=20 +# ARCH_LIB, VENDOR_LIB, VENDOR_ARCH +# +# This function used to be called perlinfo as well. +perl_set_version() { + debug-print-function $FUNCNAME "$@" + debug-print "$FUNCNAME: perlinfo_done=3D${perlinfo_done}" + ${perlinfo_done} && return 0 + perlinfo_done=3Dtrue + + local f version install{{site,vendor}{arch,lib},archlib} + eval "$(perl -V:{version,install{{site,vendor}{arch,lib},archlib}} )" + PERL_VERSION=3D${version} + SITE_ARCH=3D${installsitearch} + SITE_LIB=3D${installsitelib} + ARCH_LIB=3D${installarchlib} + VENDOR_LIB=3D${installvendorlib} + VENDOR_ARCH=3D${installvendorarch} +} + +# @FUNCTION: perl_delete_localpod +# @USAGE: perl_delete_localpod +# @DESCRIPTION: +# Remove stray perllocal.pod files in the temporary install directory D. +# +# This function used to be called fixlocalpod as well. +perl_delete_localpod() { + debug-print-function $FUNCNAME "$@" + + find "${D}" -type f -name perllocal.pod -delete + find "${D}" -depth -mindepth 1 -type d -empty -delete +} + +# @FUNCTION: perl_fix_osx_extra +# @USAGE: perl_fix_osx_extra +# @DESCRIPTION: +# Look through ${S} for AppleDouble encoded files and get rid of them. +perl_fix_osx_extra() { + debug-print-function $FUNCNAME "$@" + + local f + find "${S}" -type f -name "._*" -print0 | while read -rd '' f ; do + einfo "Removing AppleDouble encoded Macintosh file: ${f#${S}/}" + rm -f "${f}" + f=3D${f#${S}/} + grep -q "${f}" "${S}"/MANIFEST && \ + elog "AppleDouble encoded Macintosh file in MANIFEST: ${f#${S}/}" + done +} + +# @FUNCTION: perl_delete_module_manpages +# @USAGE: perl_delete_module_manpages +# @DESCRIPTION: +# Bump off manpages installed by the current module such as *.3pm files as= well +# as empty directories. +perl_delete_module_manpages() { + debug-print-function $FUNCNAME "$@" + + if [[ -d "${ED}"/usr/share/man ]] ; then + find "${ED}"/usr/share/man -type f -name "*.3pm" -delete + find "${ED}"/usr/share/man -depth -type d -empty -delete + fi +} + +# @FUNCTION: perl_delete_packlist +# @USAGE: perl_delete_packlist +# @DESCRIPTION: +# Look through ${D} for .packlist files, empty .bs files and empty directo= ries, +# and get rid of items found. +perl_delete_packlist() { + debug-print-function $FUNCNAME "$@" + perl_set_version + if [[ -d ${D}/${VENDOR_ARCH} ]] ; then + find "${D}/${VENDOR_ARCH}" -type f -a \( -name .packlist \ + -o \( -name '*.bs' -a -empty \) \) -delete + find "${D}" -depth -mindepth 1 -type d -empty -delete + fi +} + +# @FUNCTION: perl_remove_temppath +# @USAGE: perl_remove_temppath +# @DESCRIPTION: +# Look through ${D} for text files containing the temporary installation +# folder (i.e. ${D}). If the pattern is found (i.e. " text"), replace it w= ith `/'. +perl_remove_temppath() { + debug-print-function $FUNCNAME "$@" + + find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do + if file "${f}" | grep -q -i " text" ; then + grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}" + sed -i -e "s:${D}:/:g" "${f}" + fi + done +} + +# @FUNCTION: perl_rm_files +# @USAGE: perl_rm_files "file_1" "file_2" +# @DESCRIPTION: +# Remove certain files from a Perl release and remove them from the MANIFE= ST +# while we're there. +# +# Most useful in src_prepare for nuking bad tests, and is highly recommend= ed +# for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what th= ey +# test is completely irrelevant to end users, and frequently fail simply +# because the authors of Test::Pod... changed their recommendations, and t= hus +# failures are only useful feedback to Authors, not users. +# +# Removing from MANIFEST also avoids needless log messages warning +# users about files "missing from their kit". +perl_rm_files() { + debug-print-function $FUNCNAME "$@" + local skipfile=3D"${T}/.gentoo_makefile_skip" + local manifile=3D"${S}/MANIFEST" + local manitemp=3D"${T}/.gentoo_manifest_temp" + oldifs=3D"$IFS" + IFS=3D"\n" + for filename in "$@"; do + einfo "Removing un-needed ${filename}"; + # Remove the file + rm -f "${S}/${filename}" + [[ -e "${manifile}" ]] && echo "${filename}" >> "${skipfile}" + done + if [[ -e "${manifile}" && -e "${skipfile}" ]]; then + einfo "Fixing Manifest" + grep -v -F -f "${skipfile}" "${manifile}" > "${manitemp}" + mv -f -- "${manitemp}" "${manifile}" + rm -- "${skipfile}"; + fi + IFS=3D"$oldifs" +} + +# @FUNCTION: perl_link_duallife_scripts +# @USAGE: perl_link_duallife_scripts +# @DESCRIPTION: +# Moves files and generates symlinks so dual-life packages installing scri= pts do not +# lead to file collisions. Mainly for use in pkg_postinst and pkg_postrm, = and makes=20 +# only sense for perl-core packages. +perl_link_duallife_scripts() { + debug-print-function $FUNCNAME "$@" + if [[ ${CATEGORY} !=3D perl-core ]] || ! has_version ">=3Ddev-lang/perl-5= =2E8.8-r8" ; then + return 0 + fi + + local i ff + if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then + for i in "${DUALLIFESCRIPTS[@]}" ; do + alternatives_auto_makesym "/${i}" "/${i}-[0-9]*" + done + for i in "${DUALLIFEMAN[@]}" ; do + ff=3D`echo "${EROOT}"/${i%.1}-${PV}-${P}.1*` + ff=3D${ff##*.1} + alternatives_auto_makesym "/${i}${ff}" "/${i%.1}-[0-9]*" + done + else + pushd "${ED}" > /dev/null + for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do + mv ${i}{,-${PV}-${P}} || die + #DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=3D${i##*/} + DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=3D${i} + done + for i in $(find usr/share/man/man1 -maxdepth 1 -type f 2>/dev/null) ; do + mv ${i} ${i%.1}-${PV}-${P}.1 || die + DUALLIFEMAN[${#DUALLIFEMAN[*]}]=3D${i} + done + popd > /dev/null + fi +} + +# @FUNCTION: perl_check_env +# @USAGE: perl_check_env +# @DESCRIPTION: +# Checks a blacklist of known-suspect ENV values that can be accidentally = set by users +# doing personal perl work, which may accidentally leak into portage and b= reak the +# system perl installaton. +# Dies if any of the suspect fields are found, and tell the user what need= s to be unset. +# There's a workaround, but you'll have to read the code for it. +perl_check_env() { + local errored value; + + for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; = do + # Next unless match + [ -v $i ] || continue; + + # Warn only once, and warn only when one of the bad values are set. + # record failure here. + if [ ${errored:-0} =3D=3D 0 ]; then + if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then + elog "perl-module.eclass: Suspicious environment values found."; + else + eerror "perl-module.eclass: Suspicious environment values found."; + fi + fi + errored=3D1 + + # Read ENV Value + eval "value=3D\$$i"; + + # Print ENV name/value pair + if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then + elog " $i=3D\"$value\""; + else + eerror " $i=3D\"$value\""; + fi + done + + # Return if there were no failures + [ ${errored:-0} =3D=3D 0 ] && return; + + # Return if user knows what they're doing + if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then + elog "Continuing anyway, seems you know what you're doing." + return + fi + + eerror "Your environment settings may lead to undefined behavior and/or b= uild failures." + die "Please fix your environment ( ~/.bashrc, package.env, ... ), see abo= ve for details." +} diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 341fa89..5a476d2 100644 =2D-- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -7,13 +7,15 @@ # perl@gentoo.org # @AUTHOR: # Seemant Kulleen +# Andreas K. Huettel # @BLURB: eclass for perl modules # @DESCRIPTION: # The perl-module eclass is designed to allow easier installation of perl # modules, and their incorporation into the Gentoo Linux system. +# All exported functions from perl-functions.eclass (inherited here) +# explicitly also belong to the interface of perl-module.eclass. =20 =2Dinherit eutils multiprocessing unpacker =2D[[ ${CATEGORY} =3D=3D "perl-core" ]] && inherit alternatives +inherit eutils multiprocessing unpacker perl-functions =20 PERL_EXPF=3D"src_unpack src_prepare src_configure src_compile src_test src= _install" =20 @@ -321,227 +323,3 @@ perl-module_pkg_postrm() { fi perl_link_duallife_scripts } =2D =2D# @FUNCTION: perl_set_version =2D# @USAGE: perl_set_version =2D# @DESCRIPTION: =2D# Extract version information and installation paths from the current Pe= rl=20 =2D# interpreter.=20 =2D# =2D# This sets the following variables: PERL_VERSION, SITE_ARCH, SITE_LIB,= =20 =2D# ARCH_LIB, VENDOR_LIB, VENDOR_ARCH =2D# =2D# This function used to be called perlinfo as well. =2Dperl_set_version() { =2D debug-print-function $FUNCNAME "$@" =2D debug-print "$FUNCNAME: perlinfo_done=3D${perlinfo_done}" =2D ${perlinfo_done} && return 0 =2D perlinfo_done=3Dtrue =2D =2D local f version install{{site,vendor}{arch,lib},archlib} =2D eval "$(perl -V:{version,install{{site,vendor}{arch,lib},archlib}} )" =2D PERL_VERSION=3D${version} =2D SITE_ARCH=3D${installsitearch} =2D SITE_LIB=3D${installsitelib} =2D ARCH_LIB=3D${installarchlib} =2D VENDOR_LIB=3D${installvendorlib} =2D VENDOR_ARCH=3D${installvendorarch} =2D} =2D =2D# @FUNCTION: perl_delete_localpod =2D# @USAGE: perl_delete_localpod =2D# @DESCRIPTION: =2D# Remove stray perllocal.pod files in the temporary install directory D. =2D# =2D# This function used to be called fixlocalpod as well. =2Dperl_delete_localpod() { =2D debug-print-function $FUNCNAME "$@" =2D =2D find "${D}" -type f -name perllocal.pod -delete =2D find "${D}" -depth -mindepth 1 -type d -empty -delete =2D} =2D =2D# @FUNCTION: perl_fix_osx_extra =2D# @USAGE: perl_fix_osx_extra =2D# @DESCRIPTION: =2D# Look through ${S} for AppleDouble encoded files and get rid of them. =2Dperl_fix_osx_extra() { =2D debug-print-function $FUNCNAME "$@" =2D =2D local f =2D find "${S}" -type f -name "._*" -print0 | while read -rd '' f ; do =2D einfo "Removing AppleDouble encoded Macintosh file: ${f#${S}/}" =2D rm -f "${f}" =2D f=3D${f#${S}/} =2D grep -q "${f}" "${S}"/MANIFEST && \ =2D elog "AppleDouble encoded Macintosh file in MANIFEST: ${f#${S}/}" =2D done =2D} =2D =2D# @FUNCTION: perl_delete_module_manpages =2D# @USAGE: perl_delete_module_manpages =2D# @DESCRIPTION: =2D# Bump off manpages installed by the current module such as *.3pm files = as well =2D# as empty directories. =2Dperl_delete_module_manpages() { =2D debug-print-function $FUNCNAME "$@" =2D =2D if [[ -d "${ED}"/usr/share/man ]] ; then =2D find "${ED}"/usr/share/man -type f -name "*.3pm" -delete =2D find "${ED}"/usr/share/man -depth -type d -empty -delete =2D fi =2D} =2D =2D# @FUNCTION: perl_delete_packlist =2D# @USAGE: perl_delete_packlist =2D# @DESCRIPTION: =2D# Look through ${D} for .packlist files, empty .bs files and empty direc= tories, =2D# and get rid of items found. =2Dperl_delete_packlist() { =2D debug-print-function $FUNCNAME "$@" =2D perl_set_version =2D if [[ -d ${D}/${VENDOR_ARCH} ]] ; then =2D find "${D}/${VENDOR_ARCH}" -type f -a \( -name .packlist \ =2D -o \( -name '*.bs' -a -empty \) \) -delete =2D find "${D}" -depth -mindepth 1 -type d -empty -delete =2D fi =2D} =2D =2D# @FUNCTION: perl_remove_temppath =2D# @USAGE: perl_remove_temppath =2D# @DESCRIPTION: =2D# Look through ${D} for text files containing the temporary installation =2D# folder (i.e. ${D}). If the pattern is found (i.e. " text"), replace it= with `/'. =2Dperl_remove_temppath() { =2D debug-print-function $FUNCNAME "$@" =2D =2D find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do =2D if file "${f}" | grep -q -i " text" ; then =2D grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${= f}" =2D sed -i -e "s:${D}:/:g" "${f}" =2D fi =2D done =2D} =2D =2D# @FUNCTION: perl_rm_files =2D# @USAGE: perl_rm_files "file_1" "file_2" =2D# @DESCRIPTION: =2D# Remove certain files from a Perl release and remove them from the MANI= =46EST =2D# while we're there. =2D# =2D# Most useful in src_prepare for nuking bad tests, and is highly recomme= nded =2D# for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what = they =2D# test is completely irrelevant to end users, and frequently fail simply =2D# because the authors of Test::Pod... changed their recommendations, and= thus =2D# failures are only useful feedback to Authors, not users. =2D# =2D# Removing from MANIFEST also avoids needless log messages warning =2D# users about files "missing from their kit". =2Dperl_rm_files() { =2D debug-print-function $FUNCNAME "$@" =2D local skipfile=3D"${T}/.gentoo_makefile_skip" =2D local manifile=3D"${S}/MANIFEST" =2D local manitemp=3D"${T}/.gentoo_manifest_temp" =2D oldifs=3D"$IFS" =2D IFS=3D"\n" =2D for filename in "$@"; do =2D einfo "Removing un-needed ${filename}"; =2D # Remove the file =2D rm -f "${S}/${filename}" =2D [[ -e "${manifile}" ]] && echo "${filename}" >> "${skipfile}" =2D done =2D if [[ -e "${manifile}" && -e "${skipfile}" ]]; then =2D einfo "Fixing Manifest" =2D grep -v -F -f "${skipfile}" "${manifile}" > "${manitemp}" =2D mv -f -- "${manitemp}" "${manifile}" =2D rm -- "${skipfile}"; =2D fi =2D IFS=3D"$oldifs" =2D} =2D =2D# @FUNCTION: perl_link_duallife_scripts =2D# @USAGE: perl_link_duallife_scripts =2D# @DESCRIPTION: =2D# Moves files and generates symlinks so dual-life packages installing sc= ripts do not =2D# lead to file collisions. Mainly for use in pkg_postinst and pkg_postrm= , and makes=20 =2D# only sense for perl-core packages. =2Dperl_link_duallife_scripts() { =2D debug-print-function $FUNCNAME "$@" =2D if [[ ${CATEGORY} !=3D perl-core ]] || ! has_version ">=3Ddev-lang/perl= =2D5.8.8-r8" ; then =2D return 0 =2D fi =2D =2D local i ff =2D if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then =2D for i in "${DUALLIFESCRIPTS[@]}" ; do =2D alternatives_auto_makesym "/${i}" "/${i}-[0-9]*" =2D done =2D for i in "${DUALLIFEMAN[@]}" ; do =2D ff=3D`echo "${EROOT}"/${i%.1}-${PV}-${P}.1*` =2D ff=3D${ff##*.1} =2D alternatives_auto_makesym "/${i}${ff}" "/${i%.1}-[0-9]*" =2D done =2D else =2D pushd "${ED}" > /dev/null =2D for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do =2D mv ${i}{,-${PV}-${P}} || die =2D #DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=3D${i##*/} =2D DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=3D${i} =2D done =2D for i in $(find usr/share/man/man1 -maxdepth 1 -type f 2>/dev/null) ; = do =2D mv ${i} ${i%.1}-${PV}-${P}.1 || die =2D DUALLIFEMAN[${#DUALLIFEMAN[*]}]=3D${i} =2D done =2D popd > /dev/null =2D fi =2D} =2D =2D# @FUNCTION: perl_check_env =2D# @USAGE: perl_check_env =2D# @DESCRIPTION: =2D# Checks a blacklist of known-suspect ENV values that can be accidentall= y set by users =2D# doing personal perl work, which may accidentally leak into portage and= break the =2D# system perl installaton. =2D# Dies if any of the suspect fields are found, and tell the user what ne= eds to be unset. =2D# There's a workaround, but you'll have to read the code for it. =2Dperl_check_env() { =2D local errored value; =2D =2D for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX= ; do =2D # Next unless match =2D [ -v $i ] || continue; =2D =2D # Warn only once, and warn only when one of the bad values are set. =2D # record failure here. =2D if [ ${errored:-0} =3D=3D 0 ]; then =2D if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then =2D elog "perl-module.eclass: Suspicious environment values found."; =2D else =2D eerror "perl-module.eclass: Suspicious environment values found."; =2D fi =2D fi =2D errored=3D1 =2D =2D # Read ENV Value =2D eval "value=3D\$$i"; =2D =2D # Print ENV name/value pair =2D if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then =2D elog " $i=3D\"$value\""; =2D else =2D eerror " $i=3D\"$value\""; =2D fi =2D done =2D =2D # Return if there were no failures =2D [ ${errored:-0} =3D=3D 0 ] && return; =2D =2D # Return if user knows what they're doing =2D if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then =2D elog "Continuing anyway, seems you know what you're doing." =2D return =2D fi =2D =2D eerror "Your environment settings may lead to undefined behavior and/or= build failures." =2D die "Please fix your environment ( ~/.bashrc, package.env, ... ), see a= bove for details." =2D} =2D-=20 2.6.3 --Boundary-00=_JSPWWrfKEH9YTrJ--