Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Mon, 01 Aug 2011 23:48:32
Message-Id: 75a0cce2b6d7ecb8f369a65fbb047e3ce9d96b44.zmedico@gentoo
1 commit: 75a0cce2b6d7ecb8f369a65fbb047e3ce9d96b44
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 1 23:48:07 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 1 23:48:07 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=75a0cce2
7
8 unpack: always unpack to cwd (bug #376741)
9
10 This brings portage into agreement with PMS. Also, for existing EAPIs,
11 if the source file is in a writable directory then this will create a
12 symlink for backward-compatible emulation of tools like gunzip and
13 bunzip2.
14
15 ---
16 bin/ebuild.sh | 16 +++++++++++++++-
17 1 files changed, 15 insertions(+), 1 deletions(-)
18
19 diff --git a/bin/ebuild.sh b/bin/ebuild.sh
20 index 4aef413..3d4d557 100755
21 --- a/bin/ebuild.sh
22 +++ b/bin/ebuild.sh
23 @@ -370,7 +370,21 @@ unpack() {
24 $1 -c -- "$srcdir$x" | tar xof -
25 assert_sigpipe_ok "$myfail"
26 else
27 - $1 -c -- "${srcdir}${x}" > ${x%.*} || die "$myfail"
28 + local cwd_dest=${x##*/}
29 + cwd_dest=${cwd_dest%.*}
30 + $1 -c -- "${srcdir}${x}" > "${cwd_dest}" || die "$myfail"
31 + case "$EAPI" in
32 + 0|1|2|3|4|4-python)
33 + # If the source file is in a writable directory then
34 + # create a symlink for backward-compatible emulation
35 + # of tools like gunzip and bunzip2 (see bug #376741).
36 + if [[ ! -e ${x%.*} && -w ${x%/*} ]] && \
37 + [[ ${x} == "${PORTAGE_BUILDDIR}/"* ||
38 + ${x} == ./* || ${x} != /* ]] ; then
39 + ln -snf "${PWD}/${cwd_dest}" "${x%.*}"
40 + fi
41 + ;;
42 + esac
43 fi
44 }