dreamer3 Guru
Joined: 24 Sep 2002 Posts: 553
|
Posted: Sat Feb 22, 2003 8:15 am Post subject: Can SRC_URI bet set programatically in ebuild |
|
|
I'm trying something like this in an ebuild:
Code: | # if we have download a nightly previously give it priority
if [ -a ${DISTDIR}/mozilla-source.tar.bz2 ] ; then
SRC_URI="ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-source.tar.bz2"
else
VERSION="1.3test"
BASE_URI="ftp://ftp.mozilla.org/pub/mozilla/releases"
MOZ_VERSIONS="1.3b 1.3a 1.2b 1.2a"
for i in ${MOZ_VERSIONS}
do
if [ -a ${DISTDIR}/mozilla-source-${i}.tar.gz ]; then
VERSION=${i}
break
fi
done
SRC_URI="${BASE_URI}/mozilla${VERSION}/src/mozilla-source-${VERSION}.tar.gz"
fi
echo ${SRC_URI}
|
The code itself works perfectly, the echo statement outputs the CORRECT file to download, but portage always tries to download ${BASE_URI}/mozilla${VERSION}/src/mozilla-source-${VERSION}.tar.gz where ${VERSION} is always ="1.3test" _without_ exception.
I don't understand this behavior, can anyone shed any light? |
|