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 1Qo2Do-0000Vh-1T for garchives@archives.gentoo.org; Mon, 01 Aug 2011 23:48:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA33621C04A; Mon, 1 Aug 2011 23:48:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 95CE421C04A for ; Mon, 1 Aug 2011 23:48:22 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 042001B4029 for ; Mon, 1 Aug 2011 23:48:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6531F3C004 for ; Mon, 1 Aug 2011 23:48:21 +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: <75a0cce2b6d7ecb8f369a65fbb047e3ce9d96b44.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 75a0cce2b6d7ecb8f369a65fbb047e3ce9d96b44 Date: Mon, 1 Aug 2011 23:48:21 +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: a69590e79bd21f451aba4f21e1f363b4 commit: 75a0cce2b6d7ecb8f369a65fbb047e3ce9d96b44 Author: Zac Medico gentoo org> AuthorDate: Mon Aug 1 23:48:07 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Aug 1 23:48:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D75a0cce2 unpack: always unpack to cwd (bug #376741) This brings portage into agreement with PMS. Also, for existing EAPIs, if the source file is in a writable directory then this will create a symlink for backward-compatible emulation of tools like gunzip and bunzip2. --- bin/ebuild.sh | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 4aef413..3d4d557 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -370,7 +370,21 @@ unpack() { $1 -c -- "$srcdir$x" | tar xof - assert_sigpipe_ok "$myfail" else - $1 -c -- "${srcdir}${x}" > ${x%.*} || die "$myfail" + local cwd_dest=3D${x##*/} + cwd_dest=3D${cwd_dest%.*} + $1 -c -- "${srcdir}${x}" > "${cwd_dest}" || die "$myfail" + case "$EAPI" in + 0|1|2|3|4|4-python) + # If the source file is in a writable directory then + # create a symlink for backward-compatible emulation + # of tools like gunzip and bunzip2 (see bug #376741). + if [[ ! -e ${x%.*} && -w ${x%/*} ]] && \ + [[ ${x} =3D=3D "${PORTAGE_BUILDDIR}/"* || + ${x} =3D=3D ./* || ${x} !=3D /* ]] ; then + ln -snf "${PWD}/${cwd_dest}" "${x%.*}" + fi + ;; + esac fi } =20