From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 12E0E138202 for ; Sun, 25 Nov 2012 10:41:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E054A21C01E; Sun, 25 Nov 2012 10:41:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4CB8821C01E for ; Sun, 25 Nov 2012 10:41:36 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0F26C33D7A7 for ; Sun, 25 Nov 2012 10:41:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 855FEE5444 for ; Sun, 25 Nov 2012 10:41:33 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <1353840006.3dea53c2be83088d05c82a0c3dbbe7e6e1a6edea.arfrever@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: 3dea53c2be83088d05c82a0c3dbbe7e6e1a6edea X-VCS-Branch: master Date: Sun, 25 Nov 2012 10:41:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f826adb5-750d-4229-b4fd-39e0c20fda35 X-Archives-Hash: 2543928f6688aae131750ef09ab5d464 commit: 3dea53c2be83088d05c82a0c3dbbe7e6e1a6edea Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Sun Nov 25 10:40:06 2012 +0000 Commit: Arfrever Frehtes Taifersar Arahesis gmail com> CommitDate: Sun Nov 25 10:40:06 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3dea53c2 unpack(): Handle suffixes in case-insensitive way. --- bin/phase-helpers.sh | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index bc00e44..8a78f37 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -276,14 +276,18 @@ unpack() { local srcdir local x local y + local suffix local myfail local eapi=${EAPI:-0} [ -z "$*" ] && die "Nothing passed to the 'unpack' command" for x in "$@"; do __vecho ">>> Unpacking ${x} to ${PWD}" + suffix=${x##*.} + suffix=$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${suffix}") y=${x%.*} y=${y##*.} + y=$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${y}") if [[ ${x} == "./"* ]] ; then srcdir="" @@ -308,7 +312,7 @@ unpack() { } myfail="failure unpacking ${x}" - case "${x##*.}" in + case "${suffix}" in tar) tar xof "$srcdir$x" || die "$myfail" ;; @@ -319,19 +323,19 @@ unpack() { ${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d} -c -- "$srcdir$x" | tar xof - __assert_sigpipe_ok "$myfail" ;; - ZIP|zip|jar) + zip|jar) # unzip will interactively prompt under some error conditions, # as reported in bug #336285 ( set +x ; while true ; do echo n || break ; done ) | \ unzip -qo "${srcdir}${x}" || die "$myfail" ;; - gz|Z|z) + gz|z) __unpack_tar "gzip -d" ;; bz2|bz) __unpack_tar "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d}" ;; - 7Z|7z) + 7z) local my_output my_output="$(7z x -y "${srcdir}${x}")" if [ $? -ne 0 ]; then @@ -339,10 +343,10 @@ unpack() { die "$myfail" fi ;; - RAR|rar) + rar) unrar x -idq -o+ "${srcdir}${x}" || die "$myfail" ;; - LHa|LHA|lha|lzh) + lha|lzh) lha xfq "${srcdir}${x}" || die "$myfail" ;; a)