Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can SRC_URI bet set programatically in ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dreamer3
Guru
Guru


Joined: 24 Sep 2002
Posts: 553

PostPosted: Sat Feb 22, 2003 8:15 am    Post subject: Can SRC_URI bet set programatically in ebuild Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum