From 687212102e9243e3acc3bf8a5515d9a1ec0c4529 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 18 Feb 2007 23:15:54 +0000 Subject: [PATCH] When calling tar, always exclud . in order to preserver PORTAGE_WORKDIR_MODE. Thanks to Brian Harring in bug #167544. svn path=/main/trunk/; revision=6002 --- bin/ebuild.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 6004242ea..69f22f44c 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -310,7 +310,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 @@ -331,13 +331,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) @@ -345,14 +345,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" -- 2.26.2