On Tue, 15 Jul 2008 23:23:26 +0200 Marius Mauch <[EMAIL PROTECTED]> wrote: > Right, just I'd expect the parsing of SRC_URI (with conditionals) to > be a bit tricky in bash, not something I'm going to work on. An > eclass-based solution would have a few benefits though wrt the > metadata cache.
Well... You don't really have to parse it. for p in $SRC_URI ; do if [[ "${p}" == "(" ]] || [[ "${p}" == ")" ]] || \ [[ "${p%\?}" != "${p}" ]] ; then UNPACK_DEPENDS="${UNPACK_DEPENDS} $p " elif [[ "${p%.zip}" != "${p}" ]] ; then UNPACK_DEPENDS="${UNPACK_DEPENDS} app-arch/unzip " elif [[ "${p%.bz2}" != "${p}" ]] ; then UNPACK_DEPENDS="${UNPACK_DEPENDS} app-arch/bzip2 " fi done Granted, it'll generate invalid output if SRC_URI is invalid (for example, if SRC_URI has mismatched parens, the output will too), but I can't think of any situation where breaking DEPEND if SRC_URI is already broken is a problem. -- Ciaran McCreesh
signature.asc
Description: PGP signature