From deb6829a445700f6af992e4e240de113bef228f7 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 14 Apr 2007 20:04:32 +0000 Subject: [PATCH] Merged from trunk 6400:6403 +------------------------------------------------------------------------+ | 6401 | revise tests so that `insinto /` does not trigger an error | | SpankMan | (prefix: add $EPREFIX test) | |----------+-------------------------------------------------------------| | 6402 | queue compression | | SpankMan | | |----------+-------------------------------------------------------------| | 6403 | do stripping after compression dequeueing | | SpankMan | | +------------------------------------------------------------------------+ svn path=/main/branches/prefix/; revision=6409 --- bin/doins | 36 ++++++++++++++++++++++-------------- bin/prepall | 3 ++- bin/prepinfo | 2 +- bin/prepman | 2 +- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/bin/doins b/bin/doins index 7df387471..1a6fca03a 100755 --- a/bin/doins +++ b/bin/doins @@ -1,34 +1,42 @@ #!@BASH@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id: /var/cvsroot/gentoo-src/portage/bin/doins,v 1.7.2.2 2004/12/17 22:25:13 carpaski Exp $ +# $Id: $ if [ $# -lt 1 ] ; then - echo "${0}: at least one argument needed" + echo "${0##*/}: at least one argument needed" 1>&2 exit 1 fi -if [ "${1}" == "-r" ] ; then +if [[ "$1" == "-r" ]] ; then DOINSRECUR=y shift else DOINSRECUR=n fi -[ -z "${INSDEPTH}" ] && declare -i INSDEPTH=0 -if [ ${INSDEPTH} -gt 30 ] ; then - echo "${0}: sanity check ... 30 directories is too much :(" +[[ -z ${INSDEPTH} ]] && declare -i INSDEPTH=0 +if [[ ${INSDEPTH} -gt 30 ]] ; then + echo "${0##*/}: sanity check ... 30 directories is too much :(" 2>&1 exit 1 fi -if [ "${INSDESTTREE%${ED}*}" == "" ]; then - echo "-------------------------------------------------------" 1>&2 - echo "You should not use \${ED} with helpers." 1>&2 - echo " --> ${INSDESTTREE}" 1>&2 - echo "-------------------------------------------------------" 1>&2 - #exit 1 +if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then + vecho "-------------------------------------------------------" 1>&2 + vecho "You should not use \${D} or \${ED} with helpers." 1>&2 + vecho " --> ${INSDESTTREE}" 1>&2 + vecho "-------------------------------------------------------" 1>&2 + exit 1 +fi + +if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then + vecho "-------------------------------------------------------" 1>&2 + vecho "You should not use \${EPREFIX} with helpers." 1>&2 + vecho " --> ${INSDESTTREE}" 1>&2 + vecho "-------------------------------------------------------" 1>&2 + exit 1 fi -[ ! -d "${ED}${INSDESTTREE}" ] && dodir "${INSDESTTREE}" +[[ ! -d ${ED}${INSDESTTREE} ]] && dodir "${INSDESTTREE}" for x in "$@" ; do if [ -L "$x" ] ; then diff --git a/bin/prepall b/bin/prepall index c687f09b4..269765a96 100755 --- a/bin/prepall +++ b/bin/prepall @@ -13,11 +13,12 @@ fi prepallman prepallinfo -prepallstrip ecompressdir --dequeue ecompress --dequeue +prepallstrip + if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then # Restore all the file flags that were saved at the beginning of prepall. mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null diff --git a/bin/prepinfo b/bin/prepinfo index 53db45a6b..b831e465b 100755 --- a/bin/prepinfo +++ b/bin/prepinfo @@ -26,4 +26,4 @@ find "${ED}${infodir}" -type d -print0 | while read -d $'\0' x ; do rm -f "${x}"/dir{,.info}{,.gz,.bz2} done -exec ecompressdir "${infodir}" +exec ecompressdir --queue "${infodir}" diff --git a/bin/prepman b/bin/prepman index b7fbca937..b2667904c 100755 --- a/bin/prepman +++ b/bin/prepman @@ -23,6 +23,6 @@ for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do [[ -d ${subdir} ]] && really_is_mandir=1 && break done -[[ ${really_is_mandir} == 1 ]] && exec ecompressdir "${mandir#${ED}}" +[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --queue "${mandir#${ED}}" exit 0 -- 2.26.2