Leading and Trailing slashes galore. Hooray for being consistent.
authorKito <kito@gentoo.org>
Sat, 28 Jan 2006 18:24:05 +0000 (18:24 -0000)
committerKito <kito@gentoo.org>
Sat, 28 Jan 2006 18:24:05 +0000 (18:24 -0000)
svn path=/main/branches/prefix/; revision=2602

bin/dodoc
bin/ebuild.sh
bin/prepall
bin/prepalldocs
bin/prepallinfo
bin/prepallman
bin/preplib
bin/prepman

index d76b11b662871b719c07de32dfa097d707751fe1..4e16b3b8069764ab2d0b36ae0d97241dd240aa5e 100755 (executable)
--- a/bin/dodoc
+++ b/bin/dodoc
@@ -7,7 +7,7 @@ if [ $# -lt 1 ] ; then
        exit 1  
 fi
 
-dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}"
+dir="${D}/usr/share/doc/${PF}/${DOCDESTTREE}"
 if [ ! -d "${dir}" ] ; then
        install -d "${dir}"
 fi
index fed53fce3dc301be7411d4c29cff764bc7c69d2e..a7456fdac2a74145fc1a702f3eed18751f0491be 100755 (executable)
@@ -218,7 +218,7 @@ with_bindir() {
        local mybindir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       mybindir="${PREFIX}bin"
+                       mybindir="${PREFIX}/bin"
                else
                        mybindir="/bin"
                fi
@@ -237,7 +237,7 @@ with_datadir() {
        local mydatadir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       mydatadir="${PREFIX}usr/share"
+                       mydatadir="${PREFIX}/usr/share"
                else
                        mydatadir=/usr/share
                fi
@@ -256,7 +256,7 @@ with_infodir() {
        local myinfodir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       myinfodir="${PREFIX}usr/share/info"
+                       myinfodir="${PREFIX}/usr/share/info"
                else
                        myinfodir=/usr/share/info
                fi
@@ -275,7 +275,7 @@ with_mandir() {
        local mymandir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       mymandir="${PREFIX}usr/share/man"
+                       mymandir="${PREFIX}/usr/share/man"
                else
                        mymandir=/usr/share/man
                fi
@@ -294,7 +294,7 @@ with_prefix() {
        local myprefix
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       myprefix="${PREFIX}usr"
+                       myprefix="${PREFIX}/usr"
                else
                        myprefix=/usr
                fi
@@ -313,7 +313,7 @@ with_sysconfdir() {
        local myconfdir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       myconfdir="${PREFIX}etc"
+                       myconfdir="${PREFIX}/etc"
                else
                        myconfdir=/etc
                fi
@@ -332,7 +332,7 @@ with_localstatedir() {
        local mylocalstatedir
        if [ -z "${1}" ]; then
                if [ ! -z "${PREFIX}" ]; then
-                       mylocalstatedir="${PREFIX}var/lib"
+                       mylocalstatedir="${PREFIX}/var/lib"
                else
                        mylocalstatedir="/var/lib"
                fi
@@ -914,8 +914,8 @@ docinto() {
                export DOCDESTTREE=""
        else
                export DOCDESTTREE="$1"
-               if [ ! -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
-                       install -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}"
+               if [ ! -d "${D}/usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
+                       install -d "${D}/usr/share/doc/${PF}/${DOCDESTTREE}"
                fi
        fi
 }
@@ -1869,7 +1869,7 @@ if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "setup" ]; then
                        export PATH="${PREFIX}/usr/bin/ccache:${PATH}"
                fi
 
-               [ -z "${CCACHE_DIR}" ] && export CCACHE_DIR="@PREFIX/var/tmp/ccache"
+               [ -z "${CCACHE_DIR}" ] && export CCACHE_DIR="${PREFIX}/var/tmp/ccache"
 
                addread "${CCACHE_DIR}"
                addwrite "${CCACHE_DIR}"
index 9dff8f111727e6533ec1ea52643a0762984ad600..2602e2959c461bcdab208fdea0d0543982484615 100755 (executable)
@@ -9,10 +9,10 @@ prepallstrip
 
 # this should help to ensure that all (most?) shared libraries are executable
 # and that all libtool scripts / static libraries are not executable
-for i in "${D}"opt/*/lib{,32,64} \
-         "${D}"lib{,32,64}       \
-         "${D}"usr/lib{,32,64}   \
-         "${D}"usr/X11R6/lib{,32,64} ; do
+for i in "${D}"/opt/*/lib{,32,64} \
+         "${D}"/lib{,32,64}       \
+         "${D}"/usr/lib{,32,64}   \
+         "${D}"/usr/X11R6/lib{,32,64} ; do
        [[ ! -d ${i} ]] && continue
 
        for j in "${i}"/*.so.* "${i}"/*.so ; do
@@ -36,7 +36,7 @@ done
 # /lib, we have to make sure we have a linker script in /usr/lib along side 
 # the static library, or gcc will utilize the static lib when linking :(.
 # http://bugs.gentoo.org/4411
-for a in "${D}"usr/lib*/*.a ; do
+for a in "${D}"/usr/lib*/*.a ; do
        s=${a%.a}.so
        if [[ ! -e ${s} ]] ; then
                s=${s%usr/*}${s##*/usr/}
@@ -48,7 +48,7 @@ for a in "${D}"usr/lib*/*.a ; do
 done
 
 # Make sure people don't store libtool files or static libs in /lib
-f=$(ls "${D}"lib*/*.{a,la} 2>/dev/null)
+f=$(ls "${D}"/lib*/*.{a,la} 2>/dev/null)
 if [[ -n ${f} ]] ; then
        echo -e "\n\aQA Notice: excessive files found in the / partition\a"
        echo "${f}"
@@ -56,7 +56,7 @@ if [[ -n ${f} ]] ; then
 fi
 
 # Verify that the libtool files don't contain bogus $D entries.
-for a in "${D}"usr/lib*/*.la ; do
+for a in "${D}"/usr/lib*/*.la ; do
        s=${a##*/}
        if grep -qs "${D}" "${a}" ; then
                echo -e "\n\aQA Notice: ${s} appears to contain PORTAGE_TMPDIR paths\a"
@@ -67,7 +67,7 @@ done
 if type -p scanelf > /dev/null ; then
 
 # Run some sanity checks on shared libraries
-for d in "${D}"lib* "${D}"usr/lib* ; do
+for d in "${D}"/lib* "${D}"/usr/lib* ; do
        f=$(scanelf -ByF '%S %p' "${d}"/lib*.so* | gawk '$2 == "" { print }')
        if [[ -n ${f} ]] ; then
                echo -e "\n\aQA Notice: the following shared libraries lack a SONAME\a"
index bb6948c9074d2e633020d370bb77d63a96782191..3a881de6d0417e1dd7196602a8480bbe3e8058e5 100755 (executable)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $
 
-z="`find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
+z="`find "${D}"/usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
 
 for y in ${z} ; do
        if [ -L "${y}" ] ; then
index 7d30031b763843b5bbd9b0ac0bd328ef6a665443..7f587334b54902fe6ff96d1f4b253634e11a8c4c 100755 (executable)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallinfo,v 1.6 2004/10/04 13:56:50 vapier Exp $
 
-[ ! -d "${D}usr/share/info" ] && exit 0
+[ ! -d "${D}/usr/share/info" ] && exit 0
 
 echo "info:"
 prepinfo
index b241fff597c2faa2bb79d68872964589b8bf12f5..418cc5f6fc5591b0758dfa6024ffbb0d9befb37d 100755 (executable)
@@ -4,7 +4,7 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallman,v 1.10 2004/10/04 13:56:50 vapier Exp $
 
 echo "man:"
-for x in "${D}"opt/*/man "${D}"usr/share/man "${D}"usr/local/man "${D}"usr/X11R6/man ; do
+for x in "${D}"/opt/*/man "${D}"/usr/share/man "${D}"/usr/local/man "${D}"/usr/X11R6/man ; do
        if [ -d "${x}" ]
        then
                prepman "`echo "${x}" | sed -e "s:${D}::" -e "s:/man[/]*$::"`"
index 844b3ab2715c98d806343b23f21d036628681bb7..cceab2bec870236c84872f9c3f6f7d82b981480c 100755 (executable)
@@ -17,7 +17,7 @@ if [ -z "${CONF_LIBDIR}" ]; then
 fi
 
 if [ -z "$1" ] ; then
-       z="${D}usr/${CONF_LIBDIR}"
+       z="${D}/usr/${CONF_LIBDIR}"
 else
        z="${D}$1/${CONF_LIBDIR}"
 fi
index 19aba773dcf0404671a3c1b7c5377bfef623533f..f40cfccef84863ee13d176db5712009ce97c0773 100755 (executable)
@@ -4,7 +4,7 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepman,v 1.10.2.3 2005/05/29 12:40:08 jstubbs Exp $
 
 if [ -z "$1" ] ; then 
-       z="${D}usr/share/man"
+       z="${D}/usr/share/man"
 else
        z="${D}$1/man"
 fi