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 0C1C31381F3 for ; Tue, 27 Nov 2012 19:35:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF59221C0CF; Tue, 27 Nov 2012 19:33:57 +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 4F74E21C0CC for ; Tue, 27 Nov 2012 19:33:57 +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 5E4A733D948 for ; Tue, 27 Nov 2012 19:33:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E034BE5456 for ; Tue, 27 Nov 2012 19:33:52 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1354044116.768ec2393f689112e3ec0da96d330cd731f182f2.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: eclass/ X-VCS-Repository: proj/sci X-VCS-Files: eclass/intel-sdp.eclass X-VCS-Directories: eclass/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: 768ec2393f689112e3ec0da96d330cd731f182f2 X-VCS-Branch: master Date: Tue, 27 Nov 2012 19:33:52 +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: 2ec341f2-2419-4bff-973c-971f453c7c48 X-Archives-Hash: eb4d890d1bc25194368c81b42c701355 commit: 768ec2393f689112e3ec0da96d330cd731f182f2 Author: Justin Lecher gentoo org> AuthorDate: Sun Nov 25 09:51:00 2012 +0000 Commit: Justin Lecher gentoo org> CommitDate: Tue Nov 27 19:21:56 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=768ec239 Speed up unpacking #431614 --- eclass/intel-sdp.eclass | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass index b84f05f..71fe219 100644 --- a/eclass/intel-sdp.eclass +++ b/eclass/intel-sdp.eclass @@ -299,28 +299,27 @@ intel-sdp_pkg_setup() { # @DESCRIPTION: # Unpacking necessary rpms from tarball, extract them and rearrange the output. intel-sdp_src_unpack() { - local l r t rpmdir - debug-print "INTEL_RPMS_DIRS are \"${INTEL_RPMS_DIRS}\"" + local l r subdir rb t list=() + for t in ${A}; do for r in ${INTEL_RPMS}; do - # Find which subdirectory of the archive the rpm is in - rpm_found="false" for subdir in ${INTEL_RPMS_DIRS}; do - [[ "${rpm_found}" == "true" ]] && continue rpmdir=${t%%.*}/${subdir} - l=.${r}_$(date +'%d%m%y_%H%M%S').log - tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue - einfo "Unpacking ${r}" - rpm_found="true" - rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \ - "s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed" - mv ${l} opt/intel/ || die "failed moving extract log file" + list+=( ${rpmdir}/${r}) done - [[ "${rpm_found}" == "false" ]] && \ - debug-print "RPM \"${r}\" not found in ${t}" + done + tar xf "${DISTDIR}"/${t} ${list[@]} 2> /dev/null || die + for r in ${list[@]}; do + rb=$(basename ${r}) + l=.${rb}_$(date +'%d%m%y_%H%M%S').log + einfo "Unpacking ${rb}" + rpm2tar -O ${r} | tar xvf - | sed -e \ + "s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed" + mv ${l} opt/intel/ || die "failed moving extract log file" done done - mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed" + + mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed" } # @ ECLASS-FUNCTION: intel-sdp_src_install