From 09aa6336404a769252784317a5eb95fd90e08166 Mon Sep 17 00:00:00 2001 From: Kito Date: Sat, 28 Jan 2006 18:24:05 +0000 Subject: [PATCH] Leading and Trailing slashes galore. Hooray for being consistent. svn path=/main/branches/prefix/; revision=2602 --- bin/dodoc | 2 +- bin/ebuild.sh | 20 ++++++++++---------- bin/prepall | 16 ++++++++-------- bin/prepalldocs | 2 +- bin/prepallinfo | 2 +- bin/prepallman | 2 +- bin/preplib | 2 +- bin/prepman | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bin/dodoc b/bin/dodoc index d76b11b66..4e16b3b80 100755 --- 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 diff --git a/bin/ebuild.sh b/bin/ebuild.sh index fed53fce3..a7456fdac 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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}" diff --git a/bin/prepall b/bin/prepall index 9dff8f111..2602e2959 100755 --- a/bin/prepall +++ b/bin/prepall @@ -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" diff --git a/bin/prepalldocs b/bin/prepalldocs index bb6948c90..3a881de6d 100755 --- a/bin/prepalldocs +++ b/bin/prepalldocs @@ -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 diff --git a/bin/prepallinfo b/bin/prepallinfo index 7d30031b7..7f587334b 100755 --- a/bin/prepallinfo +++ b/bin/prepallinfo @@ -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 diff --git a/bin/prepallman b/bin/prepallman index b241fff59..418cc5f6f 100755 --- a/bin/prepallman +++ b/bin/prepallman @@ -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[/]*$::"`" diff --git a/bin/preplib b/bin/preplib index 844b3ab27..cceab2bec 100755 --- a/bin/preplib +++ b/bin/preplib @@ -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 diff --git a/bin/prepman b/bin/prepman index 19aba773d..f40cfccef 100755 --- a/bin/prepman +++ b/bin/prepman @@ -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 -- 2.26.2