--- a/eclass/python-utils-r1.eclass 2013-03-28 05:31:15.000000000 -0700 +++ b/eclass/python-utils-r1.eclass 2013-04-13 04:41:36.419484800 -0700 @@ -589,8 +589,8 @@ # 2) skip paths which do not exist # (python2.6 complains about them verbosely) - if [[ ${f} == /* && -d ${D}${f} ]]; then - set -- "${D}${f}" "${@}" + if [[ ${f} == /* && -d ${D%/}${f} ]]; then + set -- "${D%/}${f}" "${@}" fi done < <("${PYTHON}" -c 'import sys; print("\0".join(sys.path))') @@ -600,8 +600,8 @@ local d for d; do # make sure to get a nice path without // - local instpath=${d#${D}} - instpath=/${instpath##/} + local instpath=${d#${D%/}} + [[ ${instpath} =~ ^/*(.*)$ ]] && instpath="/${BASH_REMATCH[1]}" case "${EPYTHON}" in python*)