Removing URL escapes from a Bitbake variable


Patrick Doyle <wpdster@...>
 

I have a recipe that looks something like this (I'm simplifying a bit here):

SRC_URI += "${EXTERNAL_URL}"

do_compile() {
do -something -with $(basename ${EXTERNAL_URL} .ext)
}

where EXTERNAL_URL is supplied in the environment when invoking
Bitbake (and is whitelisted in the environment).

The problem is, if that URL has HTTP escapes in it, they get decoded
by the fetcher, and the file in ${WORKDIR} no longer looks like
$(basename ${EXTERNAL_URL}).

Is there any way to invoke a URL decoder on a variable within bitbake?
Is there any way to determine what the filename was of a file that was
downloaded?
Is there any better way to do this?

Thanks for any tips you can provide.

--wpd

Join yocto@lists.yoctoproject.org to automatically receive all group messages.