so i have this code in my ebuild ... if [ `use static` ] ; then SRC_URI="static target" S="${WORKDIR}/static" else SRC_URI="dyn target" S="${WORKDIR}/dyn" fi if i run these commands, they dont work like they should ... env USE=-static ebuild <ebuild> install env USE=static ebuild <ebuild> install whichever command i run first, i guess that S value gets cached and not properly regenerated ... if you want, i can post an example ebuild to reproduce this behavior and i have portage 2.0.41
You need to put conditionals inside the SRC_URI like: SRC_URI="static? http://static : http://dynamic" The SRC_URI gets cached, and if you use a standard bash conditional then only one of the conditions gets cached.