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 172E41387FD for ; Sun, 30 Mar 2014 08:41:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5174E094F; Sun, 30 Mar 2014 08:41:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30AE3E094F for ; Sun, 30 Mar 2014 08:41:56 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 18C7B33FD85 for ; Sun, 30 Mar 2014 08:41:55 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2279) id AD4E120057; Sun, 30 Mar 2014 08:41:53 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog multilib-build.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog multilib-build.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20140330084153.AD4E120057@flycatcher.gentoo.org> Date: Sun, 30 Mar 2014 08:41:53 +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: b7ee3f8e-5a82-4a42-8af4-d68e0c56baf2 X-Archives-Hash: 3cb5633ff695f5de4f063b8862eb8726 mgorny 14/03/30 08:41:53 Modified: ChangeLog multilib-build.eclass Log: Support rewriting symlinks in MULTILIB_CHOST_TOOLS, bug #506062. Revision Changes Path 1.1187 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1187&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1187&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1186&r2=1.1187 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1186 retrieving revision 1.1187 diff -u -r1.1186 -r1.1187 --- ChangeLog 29 Mar 2014 16:06:44 -0000 1.1186 +++ ChangeLog 30 Mar 2014 08:41:53 -0000 1.1187 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1186 2014/03/29 16:06:44 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1187 2014/03/30 08:41:53 mgorny Exp $ + + 30 Mar 2014; Michał Górny multilib-build.eclass: + Support rewriting symlinks in MULTILIB_CHOST_TOOLS, bug #506062. 29 Mar 2014; Ulrich Müller check-reqs.eclass: Move test for MERGE_TYPE from check-reqs_pkg_setup() to check-reqs_run(). 1.29 eclass/multilib-build.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.29&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.29&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.28&r2=1.29 Index: multilib-build.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- multilib-build.eclass 29 Mar 2014 03:00:44 -0000 1.28 +++ multilib-build.eclass 30 Mar 2014 08:41:53 -0000 1.29 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.28 2014/03/29 03:00:44 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.29 2014/03/30 08:41:53 mgorny Exp $ # @ECLASS: multilib-build.eclass # @MAINTAINER: @@ -246,8 +246,13 @@ # and the native variant will be symlinked to the generic name. # # This variable has to be a bash array. Paths shall be relative to -# installation root (${ED}), and name regular files. Recursive wrapping -# is not supported. +# installation root (${ED}), and name regular files or symbolic +# links to regular files. Recursive wrapping is not supported. +# +# If symbolic link is passed, both symlink path and symlink target +# will be changed. As a result, the symlink target is expected +# to be wrapped as well (either by listing in MULTILIB_CHOST_TOOLS +# or externally). # # Please note that tool wrapping is *discouraged*. It is preferred to # install pkg-config files for each ABI, and require reverse @@ -374,6 +379,18 @@ local dir=${f%/*} local fn=${f##*/} + if [[ -L ${root}/${f} ]]; then + # rewrite the symlink target + local target=$(readlink "${root}/${f}") + local target_dir + local target_fn=${target##*/} + + [[ ${target} == */* ]] && target_dir=${target%/*} + + ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \ + "${root}/${f}" || die + fi + mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die # symlink the native one back