eclass/unpacker.eclass: localize a couple variables
authorTim Harder <radhermit@gentoo.org>
Fri, 25 Jan 2019 09:52:35 +0000 (03:52 -0600)
committerTim Harder <radhermit@gentoo.org>
Thu, 31 Jan 2019 09:12:33 +0000 (03:12 -0600)
To avoid exporting them to the ebuild env.

Signed-off-by: Tim Harder <radhermit@gentoo.org>
eclass/unpacker.eclass

index 41aa3ef43da7ff15517ccf0156835515a5d23805..370f0a9c59ab82b2701bd1e6009963c0539fccf6 100644 (file)
@@ -339,6 +339,7 @@ _unpacker() {
        a=$(find_unpackable_file "${a}")
 
        # first figure out the decompression method
+       local comp=""
        case ${m} in
        *.bz2|*.tbz|*.tbz2)
                local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(type -P pbzip2 || type -P bzip2)}
@@ -353,11 +354,10 @@ _unpacker() {
        *.lz)
                : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)}
                comp="${UNPACKER_LZIP} -dc" ;;
-       *)      comp="" ;;
        esac
 
        # then figure out if there are any archiving aspects
-       arch=""
+       local arch=""
        case ${m} in
        *.tgz|*.tbz|*.tbz2|*.txz|*.tar.*|*.tar)
                arch="tar --no-same-owner -xof" ;;