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 4F37F1381F3 for ; Mon, 22 Jul 2013 13:14:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA946E0A83; Mon, 22 Jul 2013 13:14:17 +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 5FFD5E0A83 for ; Mon, 22 Jul 2013 13:14:17 +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 48DCA33E975 for ; Mon, 22 Jul 2013 13:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D4774E545F for ; Mon, 22 Jul 2013 13:14:14 +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: <1374498829.5605e3fdd4cc0a87c375d2c53dca3d45a546b06b.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: 5605e3fdd4cc0a87c375d2c53dca3d45a546b06b X-VCS-Branch: master Date: Mon, 22 Jul 2013 13:14:14 +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: 26620360-f808-4a35-84c7-91c8744f1d96 X-Archives-Hash: acf113d9511f5e9cf6414b3580e0e575 commit: 5605e3fdd4cc0a87c375d2c53dca3d45a546b06b Author: Justin Lecher gentoo org> AuthorDate: Mon Jul 22 13:13:49 2013 +0000 Commit: Justin Lecher gentoo org> CommitDate: Mon Jul 22 13:13:49 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5605e3fd sent for review Signed-off-by: Justin Lecher gentoo.org> --- eclass/intel-sdp.eclass | 51 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass index 23032bb..6e715b3 100644 --- a/eclass/intel-sdp.eclass +++ b/eclass/intel-sdp.eclass @@ -65,11 +65,10 @@ # Possibility to skip the mandatory check for licenses. Only set this if there # is really no fix. -# @ECLASS-VARIABLE: INTEL_RPMS_DIRS +# @ECLASS-VARIABLE: INTEL_RPMS_DIR # @DESCRIPTION: -# List of subdirectories in the main archive which contains the -# rpms to extract. -: ${INTEL_RPMS_DIRS:=rpm} +# Main subdirectory which contains the rpms to extract. +: ${INTEL_RPMS_DIR:=rpm} # @ECLASS-VARIABLE: INTEL_X86 # @DESCRIPTION: @@ -84,6 +83,11 @@ # Functional name of rpm without any version/arch tag # # e.g. compilerprof +# +# if the rpm is located in a directory different to INTEL_RPMS_DIR you can +# specify the full path +# +# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli # @ECLASS-VARIABLE: INTEL_DAT_RPMS # @DEFAULT_UNSET @@ -92,6 +96,11 @@ # without any version tag # # e.g. openmp +# +# if the rpm is located in a directory different to INTEL_RPMS_DIR you can +# specify the full path +# +# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common # @ECLASS-VARIABLE: INTEL_SDP_DB # @DESCRIPTION: @@ -328,22 +337,22 @@ intel-sdp_pkg_setup() { INTEL_ARCH="intel64 ia32" fi fi - INTEL_RPMS="" - INTEL_RPMS_FULL="" + INTEL_RPMS=() + INTEL_RPMS_FULL=() for p in ${INTEL_BIN_RPMS}; do if [ ${p} == $(basename ${p}) ]; then for a in ${arch}; do - INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm" + INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm ) done else - INTEL_RPMS_FULL+=" ${p} " + INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm ) fi done for p in ${INTEL_DAT_RPMS}; do if [ ${p} == $(basename ${p}) ]; then - INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm" + INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm ) else - INTEL_RPMS_FULL+=" ${p} " + INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm ) fi done @@ -356,22 +365,22 @@ intel-sdp_pkg_setup() { # @DESCRIPTION: # Unpacking necessary rpms from tarball, extract them and rearrange the output. intel-sdp_src_unpack() { - local l r subdir rb t list=() + local l r subdir rb t list=() debug_list for t in ${A}; do - for r in ${INTEL_RPMS}; do - for subdir in ${INTEL_RPMS_DIRS}; do - rpmdir=${t%%.*}/${subdir} - debug-print "Adding to decompression list: ${rpmdir}/${r}" - list+=( ${rpmdir}/${r}) - done + for r in ${INTEL_RPMS[@]}; do + rpmdir=${t%%.*}/${INTEL_RPMS_DIR} + list+=( ${rpmdir}/${r} ) done - for r in ${INTEL_RPMS_FULL}; do - debug-print "Adding to decompression list: ${r}" - list+=( ${r}) + for r in ${INTEL_RPMS_FULL[@]}; do + list+=( ${t%%.*}/${r} ) done + debug_list="$(IFS=$'\n'; echo ${list[@]} )" + + debug-print "Adding to decompression list:" + debug-print ${debug_list} tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log @@ -380,7 +389,7 @@ intel-sdp_src_unpack() { 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" + "s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed" mv ${l} opt/intel/ || die "failed moving extract log file" done done