• [gentoo-dev] [PATCH 03/15] unpacker.eclass: Fix unpack_7z to respect th

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sun Sep 25 20:30:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/unpacker.eclass | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
    index c26523a419df..1f2f09e33ad6 100644
    --- a/eclass/unpacker.eclass
    +++ b/eclass/unpacker.eclass
    @@ -344,8 +344,11 @@ unpack_7z() {

    local p7z=$(find_unpackable_file "$1")
    unpack_banner "${p7z}"
    - local output="$(7z x -y "${p7z}")"

    + # warning: putting local and command substitution in a single call
    + # discards the exit status!
    + local output
    + output="$(7z x -y "${p7z}")"
    if [ $? -ne 0 ]; then
    echo "${output}" >&2
    die "unpacking ${p7z} failed (arch=unpack_7z)"
    --
    2.37.3

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)