Preliminary work for EAPI 9, which bans the latter.

Signed-off-by: Eli Schwartz <[email protected]>
---
 eclass/unpacker.eclass | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 0ace3ae53cb9..5ebc67a7b9ab 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: unpacker.eclass
@@ -16,7 +16,7 @@
 #  - support partial unpacks?
 
 case ${EAPI} in
-       7|8) ;;
+       7|8) inherit eapi9-pipestatus ;;
        *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -280,7 +280,7 @@ unpack_makeself() {
 
        [[ -z ${decomp} ]] && decomp=$(_unpacker_get_decompressor ".${suffix}")
        "${exe[@]}" | ${decomp} | tar --no-same-owner -xf -
-       assert "failure unpacking (${filetype}) makeself ${src##*/} ('${ver}' 
+${skip})"
+       pipestatus || die "failure unpacking (${filetype}) makeself ${src##*/} 
('${ver}' +${skip})"
 }
 
 # @FUNCTION: unpack_deb
@@ -309,7 +309,7 @@ unpack_deb() {
                                        if [[ ${f} = "data.tar"* ]] ; then
                                                local 
decomp=$(_unpacker_get_decompressor "${f}")
                                                head -c "${size}" | 
${decomp:-cat}
-                                               assert "unpacking ${f} from 
${deb} failed"
+                                               pipestatus || die "unpacking 
${f} from ${deb} failed"
                                                break
                                        else
                                                head -c "${size}" > /dev/null # 
trash it
@@ -319,14 +319,14 @@ unpack_deb() {
                else
                        local f=$(
                                $(tc-getBUILD_AR) t "${deb}" | grep ^data.tar
-                               assert "data not found in ${deb}"
+                               pipestatus || die "data not found in ${deb}"
                        )
                        local decomp=$(_unpacker_get_decompressor "${f}")
                        $(tc-getBUILD_AR) p "${deb}" "${f}" | ${decomp:-cat}
-                       assert "unpacking ${f} from ${deb} failed"
+                       pipestatus || die "unpacking ${f} from ${deb} failed"
                fi
        } | tar --no-same-owner -xf -
-       assert "unpacking ${deb} failed"
+       pipestatus || die "unpacking ${deb} failed"
 }
 
 # @FUNCTION: unpack_cpio
@@ -490,7 +490,7 @@ unpack_gpkg() {
        mkdir -p "${dirname}" || die
        tar -xOf "${gpkg}" "${images[0]}" | ${decomp:-cat} |
                tar --no-same-owner -C "${dirname}" -xf -
-       assert "Unpacking ${gpkg} failed"
+       pipestatus || die "Unpacking ${gpkg} failed"
 }
 
 # @FUNCTION: _unpacker
@@ -568,7 +568,7 @@ _unpacker() {
                ${comp} < "${a}" | ${arch} -
        fi
 
-       assert "unpacking ${a} failed (comp=${comp} arch=${arch})"
+       pipestatus || die "unpacking ${a} failed (comp=${comp} arch=${arch})"
 }
 
 # @FUNCTION: unpacker
-- 
2.52.0


Reply via email to