Merged from trunk 6400:6403
authorFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 20:04:32 +0000 (20:04 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 20:04:32 +0000 (20:04 -0000)
   +------------------------------------------------------------------------+
   | 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
bin/prepall
bin/prepinfo
bin/prepman

index 7df387471199877ac7761704b5a439e77a22a00c..1a6fca03a3bcac5669baa4b393423584720480aa 100755 (executable)
--- 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
index c687f09b4718e97eb623c8cd71cfa4bfc9f62d9d..269765a96e97ede3088bceebfd0fb4cd441f77f7 100755 (executable)
@@ -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
index 53db45a6b90d22c0e06a50010c72bee16f213c88..b831e465bfe988a0723cd32069a883141b0aeb30 100755 (executable)
@@ -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}"
index b7fbca937fd06808ec995f1bbe9df3d66769eb07..b2667904cbfe799095a88f550c20baf478e979d4 100755 (executable)
@@ -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