summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-09 09:25:39 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-09 09:25:39 +0000
commit226178aca0ee4d508c099d41617d83a7b5dc3f6c (patch)
tree02888637604bd3ed35b6e1de1b81b9c371e2261e
parent1b291cd2900bcdb3fdcbdca52a325a6981ce4789 (diff)
downloadportage-226178aca0ee4d508c099d41617d83a7b5dc3f6c.tar.gz
portage-226178aca0ee4d508c099d41617d83a7b5dc3f6c.tar.bz2
portage-226178aca0ee4d508c099d41617d83a7b5dc3f6c.zip
Add new EAPI 3_pre1 value, and disable unpack() support for *.xz for earlier
EAPI values. svn path=/main/trunk/; revision=12596
-rwxr-xr-xbin/ebuild.sh13
-rw-r--r--pym/portage/__init__.py4
2 files changed, 13 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 20bf0d389..e4ba92837 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -334,6 +334,7 @@ unpack() {
local y
local myfail
local tar_opts=""
+ local eapi=${EAPI:-0}
[ -z "$*" ] && die "Nothing passed to the 'unpack' command"
for x in "$@"; do
@@ -435,11 +436,15 @@ unpack() {
fi
;;
xz)
- if [ "${y}" == "tar" ]; then
- xz -dc "${srcdir}${x}" | tar xof - ${tar_opts}
- assert "$myfail"
+ if hasq $eapi 0 1 2 ; then
+ vecho "unpack ${x}: file format not recognized. Ignoring."
else
- xz -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
+ if [ "${y}" == "tar" ]; then
+ xz -dc "${srcdir}${x}" | tar xof - ${tar_opts}
+ assert "$myfail"
+ else
+ xz -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
+ fi
fi
;;
*)
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 8cb195383..7fcebe949 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4819,6 +4819,7 @@ def _spawn_misc_sh(mysettings, commands, **kwargs):
eerror(l, phase=mydo, key=mysettings.mycpv)
return rval
+_testing_eapis = frozenset(["3_pre1"])
_deprecated_eapis = frozenset(["2_pre3", "2_pre2", "2_pre1"])
def _eapi_is_deprecated(eapi):
@@ -4830,6 +4831,9 @@ def eapi_is_supported(eapi):
if _eapi_is_deprecated(eapi):
return True
+ if eapi in _testing_eapis:
+ return True
+
try:
eapi = int(eapi)
except ValueError: