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 362811381F3 for ; Mon, 19 Nov 2012 01:11:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3C99821C031; Mon, 19 Nov 2012 01:11:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C55021C031 for ; Mon, 19 Nov 2012 01:11:28 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 797C933D7A3 for ; Mon, 19 Nov 2012 01:11:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E2CE1E5442 for ; Mon, 19 Nov 2012 01:11:25 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1353286994.12a60e3fea8fe751f26d3153fbd940fad085038f.vapier@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 12a60e3fea8fe751f26d3153fbd940fad085038f X-VCS-Branch: master Date: Mon, 19 Nov 2012 01:11:25 +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: 011144bc-87d0-4c13-aedc-8d2f0d265f92 X-Archives-Hash: 8d40a0c0305eaf9475e9a7d39e988682 commit: 12a60e3fea8fe751f26d3153fbd940fad085038f Author: Mike Frysinger gentoo org> AuthorDate: Mon Nov 19 01:03:14 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Nov 19 01:03:14 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gcc-config.git;a=commit;h=12a60e3f gcc-config: clean up libgcj pc files better We need to clean up libgcj when switching to versions that do not have gcj support enabled. We should also clean up all broken symlinks that might be orphaned due to the unmerging of older versions. URL: http://bugs.gentoo.org/430932 Reported-by: Arfrever Frehtes Taifersar Arahesis gmail.com> Signed-off-by: Mike Frysinger gentoo.org> --- gcc-config | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gcc-config b/gcc-config index 0445335..0406f95 100755 --- a/gcc-config +++ b/gcc-config @@ -422,14 +422,19 @@ switch_profile() { ln -sf ${CC_COMP} "${GCC_ENV_D}/.NATIVE" # Relocate random crap - if [[ -e ${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig/libgcj-${CC_COMP_VERSION}.pc ]] ; then - local mver=${CC_COMP_VERSION:0:3} - for x in "" "-${mver}" ; do - x="${ROOT}/usr/lib/pkgconfig/libgcj${x}.pc" + local pkgconfdir="${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig" + local mver=${CC_COMP_VERSION:0:3} + for x in "" "-${mver}" ; do + x="${pkgconfdir}/libgcj${x}.pc" + if [[ -e ${pkgconfdir}/libgcj-${CC_COMP_VERSION}.pc ]] ; then + ln -sf libgcj-${CC_COMP_VERSION}.pc "${x}" + else + # Maybe we selected a version that lacks gcj support. rm -f "${x}" - ln -s libgcj-${CC_COMP_VERSION}.pc "${x}" - done - fi + fi + done + # Clean out anything left over from older versions. #430932 + find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null handle_split_usr : $(( envd_changed += $? ))