summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-05 00:03:14 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-05 00:03:14 +0000
commit711f9ed7774df900ef58931b289f214f378ab6ad (patch)
tree7d250f8054ad8fb05e24470427e85206ded1a902
parentclean up and allow for selectable compression methods #9870 (diff)
downloadportage-cvs-711f9ed7774df900ef58931b289f214f378ab6ad.tar.gz
portage-cvs-711f9ed7774df900ef58931b289f214f378ab6ad.tar.bz2
portage-cvs-711f9ed7774df900ef58931b289f214f378ab6ad.zip
allow people to unpack files in $PWD with ./ syntax #24637
-rw-r--r--ChangeLog6
-rwxr-xr-xbin/ebuild-default-functions.sh56
2 files changed, 36 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index ae840e4..76034ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,16 @@
# ChangeLog for Portage; the Gentoo Linux ports system
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Id: ChangeLog,v 1.971 2005/05/04 23:50:33 vapier Exp $
+# $Id: ChangeLog,v 1.972 2005/05/05 00:03:14 vapier Exp $
MAJOR CHANGES in 2.0.51:
1. /var/cache/edb/virtuals is no longer used at all. It's calculated now.
2. /var/cache/edb/world is now /var/lib/portage/world.
3. /etc/portage/profile/virtuals is _USER_ configs only.
+ 04 May 2005; Mike Frysinger <vapier@gentoo.org>
+ bin/ebuild-default-functions.sh:
+ Allow people to pass files in $PWD to unpack via ./FILE syntax #24637.
+
04 May 2005; Mike Frysinger <vapier@gentoo.org> bin/do{doc,info,man}
bin/prepall{docs,info,man} bin/prep{info,man}:
Clean up and standardize the output. Also allow for selecting of compression
diff --git a/bin/ebuild-default-functions.sh b/bin/ebuild-default-functions.sh
index 38e5395..5c537f7 100755
--- a/bin/ebuild-default-functions.sh
+++ b/bin/ebuild-default-functions.sh
@@ -2,7 +2,7 @@
# ebuild-default-functions.sh; default functions for ebuild env that aren't saved- specific to the portage instance.
# Copyright 2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-$Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/ebuild-default-functions.sh,v 1.20 2005/05/04 01:07:04 vapier Exp $
+$Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/ebuild-default-functions.sh,v 1.21 2005/05/05 00:03:14 vapier Exp $
has_version() {
# if there is a predefined portageq call, use it.
@@ -89,50 +89,56 @@ addpredict()
}
unpack() {
- local x
- local y
+ local x y
local myfail
local tarvars
+ local srcdir
- if [ "$USERLAND" == "BSD" ]; then
+ if [ "$USERLAND" == "BSD" ] ; then
tarvars=""
else
- tarvars="--no-same-owner"
- fi
+ tarvars="--no-same-owner"
+ fi
[ -z "$*" ] && die "Nothing passed to the 'unpack' command"
for x in "$@"; do
myfail="failure unpacking ${x}"
- echo ">>> Unpacking ${x} to $(pwd)"
- y="${x%.*}"
- y="${y##*.}"
+ echo ">>> Unpacking ${x} to ${PWD}"
+ y=${x%.*}
+ y=${y##*.}
+
+ if [ "${x:0:2}" = "./" ] ; then
+ srcdir=""
+ else
+ srcdir="${DISTDIR}/"
+ fi
case "${x##*.}" in
- tar)
- tar ${tarvars} -xf "${DISTDIR}/${x}" || die "$myfail"
+ tar)
+ tar ${tarvars} -xf "${srcdir}${x}" || die "$myfail"
;;
- tgz)
- tar ${tarvars} -xzf "${DISTDIR}/${x}" || die "$myfail"
+ tgz)
+ tar ${tarvars} -xzf "${srcdir}${x}" || die "$myfail"
;;
- tbz2)
- bzip2 -dc "${DISTDIR}/${x}" | tar ${tarvars} -xf - || die "$myfail"
+ tbz2)
+ bzip2 -dc "${srcdir}${x}" | tar ${tarvars} -xf - || die "$myfail"
;;
- ZIP|zip)
- unzip -qo "${DISTDIR}/${x}" || die "$myfail"
+ ZIP|zip)
+ unzip -qo "${srcdir}${x}" || die "$myfail"
;;
- gz|Z|z)
- if [ "${y}" == "tar" ]; then
- tar ${tarvars} -xzf "${DISTDIR}/${x}" || die "$myfail"
+ gz|Z|z)
+ if [ "${y}" == "tar" ] ; then
+ tar ${tarvars} -xzf "${srcdir}${x}" || die "$myfail"
else
- gzip -dc "${DISTDIR}/${x}" > ${x%.*} || die "$myfail"
+ gzip -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
fi
;;
- bz2)
- if [ "${y}" == "tar" ]; then
- bzip2 -dc "${DISTDIR}/${x}" | tar ${tarvars} -xf - || die "$myfail"
+ bz2)
+ if [ "${y}" == "tar" ] ; then
+ bzip2 -dc "${srcdir}${x}" | tar ${tarvars} -xf - || die "$myfail"
else
- bzip2 -dc "${DISTDIR}/${x}" > ${x%.*} || die "$myfail"
+ bzip2 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
fi
;;
*)