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 4EEF91381F3 for ; Mon, 22 Jul 2013 12:04:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE213E0AE0; Mon, 22 Jul 2013 12:04:34 +0000 (UTC) Received: from hetzner3.not-your-server.de (hetzner3.not-your-server.de [144.76.31.203]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4A4DE0ADD for ; Mon, 22 Jul 2013 12:04:33 +0000 (UTC) Received: from localhost (localhost [IPv6:::1]) by hetzner3.not-your-server.de (Postfix) with ESMTP id 4B105E005D; Mon, 22 Jul 2013 14:04:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at not-your-server.de Received: from hetzner3.not-your-server.de ([127.0.0.1]) by localhost (hetzner3.not-your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 48BiVwTj8EWi; Mon, 22 Jul 2013 14:04:42 +0200 (CEST) Received: from paul.ics.kfa-juelich.de (vpn-c3.not-your-server.de [IPv6:2a01:4f8:191:22ca::2:1003]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hetzner3.not-your-server.de (Postfix) with ESMTPSA id 40736E0044; Mon, 22 Jul 2013 14:04:42 +0200 (CEST) Message-ID: <51ED1FCE.7090401@gentoo.org> Date: Mon, 22 Jul 2013 14:04:30 +0200 From: justin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130710 Thunderbird/17.0.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] RFC: intel-sdp.eclass - support for absolute location of rpms X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2LADDNDFRDOLOSXIWXDHL" X-Archives-Salt: df284a95-4f18-4330-b77b-9fb44e58e1e7 X-Archives-Hash: d745cbfac657197a3e981f364a668b39 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2LADDNDFRDOLOSXIWXDHL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, this patch adds proper support for rpm location outside the main director= y. The old API only allowed defining the rpm basic name, which gets combined with the possible subdirs containing rpms. The new API only allows a single main directory where it expects rpms in. If there are rpms outside this dir, you need to give the full path. Thanks for comments, Justin --- /local/home/justin/tree/eclass/intel-sdp.eclass 2013-07-19 16:00:50.000000000 +0200 +++ intel-sdp.eclass 2013-07-22 14:02:16.686582103 +0200 @@ -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:=3Drpm} +# Main subdirectory which contains the rpms to extract. +: ${INTEL_RPMS_DIR:=3Drpm} # @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 c= an +# 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 c= an +# specify the full path +# +# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common # @ECLASS-VARIABLE: INTEL_SDP_DB # @DESCRIPTION: @@ -328,14 +337,23 @@ INTEL_ARCH=3D"intel64 ia32" fi fi - INTEL_RPMS=3D"" + INTEL_RPMS=3D() + INTEL_RPMS_FULL=3D() for p in ${INTEL_BIN_RPMS}; do - for a in ${arch}; do - INTEL_RPMS+=3D" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.r= pm" - done + if [ ${p} =3D=3D $(basename ${p}) ]; then + for a in ${arch}; do + INTEL_RPMS+=3D( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.r= pm ) + done + else + INTEL_RPMS_FULL+=3D( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm ) + fi done for p in ${INTEL_DAT_RPMS}; do - INTEL_RPMS+=3D" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch= =2Erpm" + if [ ${p} =3D=3D $(basename ${p}) ]; then + INTEL_RPMS+=3D( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch= =2Erpm ) + else + INTEL_RPMS_FULL+=3D( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )= + fi done case "${EAPI:-0}" in @@ -347,23 +365,31 @@ # @DESCRIPTION: # Unpacking necessary rpms from tarball, extract them and rearrange the output. intel-sdp_src_unpack() { - local l r subdir rb t list=3D() + local l r subdir rb t list=3D() debug_list for t in ${A}; do - for r in ${INTEL_RPMS}; do - for subdir in ${INTEL_RPMS_DIRS}; do - rpmdir=3D${t%%.*}/${subdir} - debug-print "Adding to decompression list: ${rpmdir}/${r}" - list+=3D( ${rpmdir}/${r}) - done + for r in ${INTEL_RPMS[@]}; do + rpmdir=3D${t%%.*}/${INTEL_RPMS_DIR} + list+=3D( ${rpmdir}/${r} ) + done + + for r in ${INTEL_RPMS_FULL[@]}; do + list+=3D( ${t%%.*}/${r} ) done - tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log || d= ie + + debug_list=3D"$(IFS=3D$'\n'; echo ${list[@]} )" + + debug-print "Adding to decompression list:" + debug-print ${debug_list} + + tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log + for r in ${list[@]}; do rb=3D$(basename ${r}) l=3D.${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 ------enig2LADDNDFRDOLOSXIWXDHL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJR7R/OAAoJELnU8jG9FVirwEcQAI79tLbZ7M8tpJUGRUGdm+Sa e+HDfMAh8jFauTdjEA5m2lrk/yhTs68/5EkvO2rbrTVKxfIqicWwX1LCGkhIpA31 4tqTdv4Sk3Np+3XUZf02rI2qmLjnbyPSm2rCz8jNKcblBAeeSYS1g2Qpdr0+Qbc+ ILdghuel+LvOrMchBzTUGWFbkCGirLGShpgzbn7K8xZ0ge5x7T6TOfPlw+RRWWki 6+57vghufR1L0hQYhbWz4Voe2Rgvna2c3e7yYfTcW9O2a50oYP+YKnMt6W7Q0Du+ hxFOZQGqCF5sCcr+PIGgKmO3vahfU+7N18ahe59R6ltEBw4+DEgxupqA7TePoZTD +pwZZqp4W5kYZ2oMBtBiQCPXE1FtvMy6DkPBaj+7ZIzKxqHlPK2eGXY9exfTIT6i 246FDtT4Ja7b1k5uPZdB6zO3F5E0lNoEkqHVbIQHQMtyrQTUfiBiYkxbdv3/RFba Vsy+afLVgH32fvPlurGF1tuqBqkERo0gkEOM8KjpSqWBdmD+EsdYD96v8MMWs2OH 0CcxBfGPLR8kS6csHIRcxhMrXbYz2E5FyH9ihwVgG88ngVgXeFdZQDQSGNKBli/0 mGd0xEBPVIqAWHZaNkp8r2k66Pbuy4ohz+IpxJG7Y6d7Sxb0WoJhTt/C2VSH0opg yctz/JyNvzeBCner+5kF =sDks -----END PGP SIGNATURE----- ------enig2LADDNDFRDOLOSXIWXDHL--