From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SNjZa-00078n-Fw for garchives@archives.gentoo.org; Fri, 27 Apr 2012 11:42:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9721DE0698; Fri, 27 Apr 2012 11:42:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6C320E0698 for ; Fri, 27 Apr 2012 11:42:18 +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 CB97E1B403D for ; Fri, 27 Apr 2012 11:42:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8DDD2E542C for ; Fri, 27 Apr 2012 11:42:16 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1335380737.a0859cc9d2cdaa0d14f8f5b3ef84345f76bb9ab6.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: a0859cc9d2cdaa0d14f8f5b3ef84345f76bb9ab6 X-VCS-Branch: master Date: Fri, 27 Apr 2012 11:42:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2a5a6524-d65d-4693-9034-53fb116ba8ad X-Archives-Hash: 2b955800793d06afd0ff7c7b72816acd commit: a0859cc9d2cdaa0d14f8f5b3ef84345f76bb9ab6 Author: Nicolas Bigaouette gmail com> AuthorDate: Wed Apr 25 18:23:53 2012 +0000 Commit: Justin Lecher gentoo org> CommitDate: Wed Apr 25 19:05:37 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3Da0859cc9 Don't hardcode "rpm" as being the archive subdirectory where RPMs are to = be found. Instead, define "INTEL_RPMS_DIRS" in the ebuild and loop over s= earching for the RPM. If unset, defaults to "rpm". --- eclass/intel-sdp.eclass | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass index 932466b..7271b30 100644 --- a/eclass/intel-sdp.eclass +++ b/eclass/intel-sdp.eclass @@ -29,6 +29,11 @@ # @DESCRIPTION: the package sub-directory where it will end-up in /opt/i= ntel # To find out its value, you have to do a raw install from the Intel tar= ball =20 +# @ECLASS-VARIABLE: INTEL_RPMS_DIRS +# @DEFAULT_UNSET +# @DESCRIPTION: a list of subdirectories in the main archive which conta= ins the +# rpms to extract. + inherit versionator check-reqs multilib =20 INTEL_PV1=3D$(get_version_component_range 1) @@ -97,15 +102,20 @@ intel-sdp_src_unpack() { # TODO: need to find a fast way to find the rpmdir # in some cases rpms are in rpms/, in other cases in rpm/ # tar tvf is too slow for 1.4G tar balls - rpmdir=3D${t%%.*}/rpm for r in ${INTEL_RPMS}; do - einfo "Unpacking ${r}" - l=3D.${r}_$(date +'%d%m%y_%H%M%S').log - tar xf "${DISTDIR}"/${t} \ - ${rpmdir}/${r} || die "extracting ${r} failed" - 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" + # Find which subdirectory of the archive the rpm is in + rpm_found=3D"false" + for subdir in ${INTEL_RPMS_DIRS:-rpm}; do + [[ "${rpm_found}" =3D=3D "true" ]] && continue + rpmdir=3D${t%%.*}/${subdir} + l=3D.${r}_$(date +'%d%m%y_%H%M%S').log + tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue + einfo "Unpacking ${r}" + rpm_found=3D"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" + done done done mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"