Add new EAPI 3_pre1 value, and disable unpack() support for *.xz for earlier
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:50:20 +0000 (03:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 03:50:20 +0000 (03:50 -0000)
EAPI values. (trunk r12596)

svn path=/main/branches/2.1.6/; revision=12877

bin/ebuild.sh
pym/portage/__init__.py

index 20bf0d389d059294f87de75bb9c52ce80253402b..e4ba92837e2dabe5d52fd40e0b2c8af6d7875cb5 100755 (executable)
@@ -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
                                ;;
                        *)
index 2f90061389db6e3d0e556d440bc5b46b1d169c29..ae4e7a1200a17a8b77f6243c1c4ff0f457ecf05b 100644 (file)
@@ -4809,6 +4809,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):
@@ -4820,6 +4821,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: