summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-18 23:16:17 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-18 23:16:17 +0000
commit55604819840166f1adb1080b6a8d284c53527d4b (patch)
treea82391093e651c555848fa02cb7cb3ef5a257137 /bin/ebuild.sh
parentaa21fb1d552a77baf3e85ec24463b3c497c2680f (diff)
downloadportage-55604819840166f1adb1080b6a8d284c53527d4b.tar.gz
portage-55604819840166f1adb1080b6a8d284c53527d4b.tar.bz2
portage-55604819840166f1adb1080b6a8d284c53527d4b.zip
When calling tar, always exclud . in order to preserver PORTAGE_WORKDIR_MODE. Thanks to Brian Harring in bug #167544. (trunk r6001:6002)
svn path=/main/branches/2.1.2/; revision=6003
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index f445941d1..0f0c23f01 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -385,7 +385,7 @@ unpack() {
local x
local y
local myfail
-
+ local tar_opts="--exclude ." # preserve ${PORTAGE_WORKDIR_MODE}
[ -z "$*" ] && die "Nothing passed to the 'unpack' command"
for x in "$@"; do
@@ -406,13 +406,13 @@ unpack() {
myfail="failure unpacking ${x}"
case "${x##*.}" in
tar)
- tar xof "${srcdir}${x}" || die "$myfail"
+ tar xof "${srcdir}${x}" ${tar_opts} || die "$myfail"
;;
tgz)
- tar xozf "${srcdir}${x}" || die "$myfail"
+ tar xozf "${srcdir}${x}" ${tar_opts} || die "$myfail"
;;
tbz|tbz2)
- bzip2 -dc "${srcdir}${x}" | tar xof -
+ bzip2 -dc "${srcdir}${x}" | tar xof - ${tar_opts}
assert "$myfail"
;;
ZIP|zip|jar)
@@ -420,14 +420,14 @@ unpack() {
;;
gz|Z|z)
if [ "${y}" == "tar" ]; then
- tar zoxf "${srcdir}${x}" || die "$myfail"
+ tar zoxf "${srcdir}${x}" ${tar_opts} || die "$myfail"
else
gzip -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
fi
;;
bz2|bz)
if [ "${y}" == "tar" ]; then
- bzip2 -dc "${srcdir}${x}" | tar xof -
+ bzip2 -dc "${srcdir}${x}" | tar xof - ${tar_opts}
assert "$myfail"
else
bzip2 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"