Index: ebuild.sh =================================================================== --- ebuild.sh (revision 8877) +++ ebuild.sh (working copy) @@ -313,15 +313,16 @@ y=${x%.*} y=${y##*.} - myfail="${x} does not exist" - if [ "${x:0:2}" = "./" ] ; then + if [[ ${x} == "./"* ]] ; then srcdir="" + elif [[ ${x} == ${DISTDIR}* ]] && \ + die "Arguments to unpack() should not begin with \${DISTDIR}." + elif [[ ${x} == "/"* ]] ; then + die "Arguments to unpack() should not be absolute" else srcdir="${DISTDIR}/" fi - [[ ${x} == ${DISTDIR}* ]] && \ - die "Arguments to unpack() should not begin with \${DISTDIR}." - [ ! -s "${srcdir}${x}" ] && die "$myfail" + [[ ! -s ${srcdir}${x} ]] && die "${x} does not exist" myfail="failure unpacking ${x}" case "${x##*.}" in