From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q9QXn-0006gD-W3 for garchives@archives.gentoo.org; Mon, 11 Apr 2011 23:29:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE7AC1C028; Mon, 11 Apr 2011 23:29:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AF8C91C028 for ; Mon, 11 Apr 2011 23:29:12 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3BDF61B40D6 for ; Mon, 11 Apr 2011 23:29:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9E80C80065 for ; Mon, 11 Apr 2011 23:29:11 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <2e334d77e3d1836ab6ba5dfc1700e90f9599d4d3.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild-helpers/doins X-VCS-Directories: bin/ebuild-helpers/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2e334d77e3d1836ab6ba5dfc1700e90f9599d4d3 Date: Mon, 11 Apr 2011 23:29:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 876d35b4f44058ff5c1acd1053b1ddd2 commit: 2e334d77e3d1836ab6ba5dfc1700e90f9599d4d3 Author: Zac Medico gentoo org> AuthorDate: Mon Apr 11 23:23:54 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Apr 11 23:23:54 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D2e334d77 doins: dereference abs symlinks to files Our fake $DISTDIR contains symlinks that should not be reproduced inside $D. In order to ensure that things like dodoc "$DISTDIR"/foo.pdf work as expected, we dereference symlinked files that are referenced by absolute paths. Thanks to James Cloos jhcloos.com> for reporting this issue which he observed with the sci-mathematics/minisat ebuild. --- bin/ebuild-helpers/doins | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index 0aedcb9..3daa9a0 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -55,7 +55,13 @@ _doins() { local mysrc=3D"$1" mydir=3D"$2" cleanup=3D"" rval =20 if [ -L "$mysrc" ] ; then - if [ $PRESERVE_SYMLINKS =3D y ] ; then + # Our fake $DISTDIR contains symlinks that should + # not be reproduced inside $D. In order to ensure + # that things like dodoc "$DISTDIR"/foo.pdf work + # as expected, we dereference symlinked files that + # are referenced by absolute paths. + if [ $PRESERVE_SYMLINKS =3D y ] && \ + ! [[ -f "$mysrc" && $(readlink "$mysrc") =3D=3D /* ]] ; then rm -rf "$D$INSDESTTREE/$mydir/${mysrc##*/}" || return $? cp -P "$mysrc" "$D$INSDESTTREE/$mydir/${mysrc##*/}" return $?