diff options
author | 2012-11-25 10:51:00 +0100 | |
---|---|---|
committer | 2012-11-27 20:21:56 +0100 | |
commit | 768ec2393f689112e3ec0da96d330cd731f182f2 (patch) | |
tree | 909c6440d133560bac5a4223bc18335ca9937184 /eclass | |
parent | Drop additional blank lines. (diff) | |
download | sci-768ec2393f689112e3ec0da96d330cd731f182f2.tar.gz sci-768ec2393f689112e3ec0da96d330cd731f182f2.tar.bz2 sci-768ec2393f689112e3ec0da96d330cd731f182f2.zip |
Speed up unpacking #431614
Diffstat (limited to 'eclass')
-rw-r--r-- | 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 b84f05f73..71fe21996 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 |