From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6197F138334 for ; Mon, 9 Jul 2018 16:20:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB91FE08C9; Mon, 9 Jul 2018 16:20:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 895ABE08C9 for ; Mon, 9 Jul 2018 16:20:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3AA6335C71 for ; Mon, 9 Jul 2018 16:20:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D6C07355 for ; Mon, 9 Jul 2018 16:20:31 +0000 (UTC) From: "Michael Haubenwallner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Haubenwallner" Message-ID: <1531153208.c3e6586e21f32f3da585b7e0ff8ea732c5bd7e66.haubi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: haubi X-VCS-Committer-Name: Michael Haubenwallner X-VCS-Revision: c3e6586e21f32f3da585b7e0ff8ea732c5bd7e66 X-VCS-Branch: master Date: Mon, 9 Jul 2018 16:20:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 17716414-c29d-427c-b889-da481c16f568 X-Archives-Hash: d5ecbd8d90343f8ce9f248a2fe8e4bc9 commit: c3e6586e21f32f3da585b7e0ff8ea732c5bd7e66 Author: Michael Haubenwallner gentoo org> AuthorDate: Thu Jun 21 13:20:10 2018 +0000 Commit: Michael Haubenwallner gentoo org> CommitDate: Mon Jul 9 16:20:08 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3e6586e toolchain.eclass: EAPI 7 aware for D,ED,ROOT,EROOT These variables may or may not have the trailing slash. Additionally, avoid leading double slash (a network location for Cygwin) with ROOT and EROOT because they may be empty, while D and ED never should be empty and there is no reason so far to avoid double slashes in between. On the other hand, eclass variables like DATAPATH and LIBPATH do contain the leading slash, so an extra slash reduces readability for no reason. eclass/toolchain.eclass | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d80889d1ba6..09d2b7869e1 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1795,13 +1795,13 @@ toolchain_src_install() { cd "${S}" if is_crosscompile; then - rm -rf "${ED}"usr/share/{man,info} + rm -rf "${ED}"/usr/share/{man,info} rm -rf "${D}"${DATAPATH}/{man,info} else if tc_version_is_at_least 3.0 ; then local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man) if [[ -d ${cxx_mandir} ]] ; then - cp -r "${cxx_mandir}"/man? "${D}/${DATAPATH}"/man/ + cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/ fi fi has noinfo ${FEATURES} \ @@ -1852,7 +1852,7 @@ toolchain_src_install() { # libvtv.la: gcc itself handles linkage correctly. # lib*san.la: Sanitizer linkage is handled internally by gcc, and they # do not support static linking. #487550 #546700 - find "${D}/${LIBPATH}" \ + find "${D}${LIBPATH}" \ '(' \ -name libstdc++.la -o \ -name libstdc++fs.la -o \ @@ -1918,7 +1918,7 @@ gcc_movelibs() { # code to run on the target. if tc_version_is_at_least 5 && is_crosscompile ; then dodir "${HOSTLIBPATH#${EPREFIX}}" - mv "${ED}"usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die + mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die fi # For all the libs that are built for CTARGET, move them into the @@ -2115,7 +2115,7 @@ gcc_slot_java() { toolchain_pkg_postinst() { do_gcc_config - if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow update all fi @@ -2130,17 +2130,17 @@ toolchain_pkg_postinst() { echo # Clean up old paths - rm -f "${EROOT}"*/rcscripts/awk/fixlafiles.awk "${EROOT}"sbin/fix_libtool_files.sh - rmdir "${EROOT}"*/rcscripts{/awk,} 2>/dev/null + rm -f "${EROOT%/}"/*/rcscripts/awk/fixlafiles.awk "${EROOT%/}"/sbin/fix_libtool_files.sh + rmdir "${EROOT%/}"/*/rcscripts{/awk,} 2>/dev/null - mkdir -p "${EROOT}"usr/{share/gcc-data,sbin,bin} + mkdir -p "${EROOT%/}"/usr/{share/gcc-data,sbin,bin} # DATAPATH has EPREFIX already, use ROOT with it - cp "${ROOT}${DATAPATH}"/fixlafiles.awk "${EROOT}"usr/share/gcc-data/ || die - cp "${ROOT}${DATAPATH}"/fix_libtool_files.sh "${EROOT}"usr/sbin/ || die + cp "${ROOT%/}${DATAPATH}"/fixlafiles.awk "${EROOT%/}"/usr/share/gcc-data/ || die + cp "${ROOT%/}${DATAPATH}"/fix_libtool_files.sh "${EROOT%/}"/usr/sbin/ || die # Since these aren't critical files and portage sucks with # handling of binpkgs, don't require these to be found - cp "${ROOT}${DATAPATH}"/c{89,99} "${EROOT}"usr/bin/ 2>/dev/null + cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null fi if use regression-test ; then @@ -2156,7 +2156,7 @@ toolchain_pkg_postinst() { } toolchain_pkg_postrm() { - if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow clean all fi @@ -2167,16 +2167,16 @@ toolchain_pkg_postrm() { # clean up the cruft left behind by cross-compilers if is_crosscompile ; then - if [[ -z $(ls "${EROOT}"etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then - rm -f "${EROOT}"etc/env.d/gcc/config-${CTARGET} - rm -f "${EROOT}"etc/env.d/??gcc-${CTARGET} - rm -f "${EROOT}"usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} + if [[ -z $(ls "${EROOT%/}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then + rm -f "${EROOT%/}"/etc/env.d/gcc/config-${CTARGET} + rm -f "${EROOT%/}"/etc/env.d/??gcc-${CTARGET} + rm -f "${EROOT%/}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} fi return 0 fi # ROOT isnt handled by the script - [[ ${ROOT} != "/" ]] && return 0 + [[ ${ROOT%/} ]] && return 0 if [[ ! -e ${LIBPATH}/libstdc++.so ]] ; then # make sure the profile is sane during same-slot upgrade #289403 @@ -2209,7 +2209,7 @@ do_gcc_config() { [[ -n ${current_specs} ]] && use_specs=-${current_specs} if [[ -n ${use_specs} ]] && \ - [[ ! -e ${ROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]] + [[ ! -e ${ROOT%/}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]] then ewarn "The currently selected specs-specific gcc config," ewarn "${current_specs}, doesn't exist anymore. This is usually"