[OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI
Kamble, Nitin A
nitin.a.kamble at intel.com
Mon Jan 21 00:25:45 UTC 2013
> Embrace the power of the scripting we have, there are much more
> interesting ways to solve this problem generically. For example, I wrote this
> piece of code in a few minutes (admittedly untested):
>
>
> urlremapper.bbclass:
>
> python () {
> mod = False
> newsrcuri = []
> srcuri = (d.getVar("SRC_URI", True) or "").split()
> maps = d.getVarFlags("URLREMAP")
> for uri in srcuri:
> for u in maps:
> if uri.startswith(u):
> uri.replace(u, maps[u])
> mod = True
> newsrcuri.append(uri)
> if mod:
> d.setVar("SRC_URI", " ".join(newsrcuri)) }
>
>
> URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] =
> "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"
>
> which should do what you want but in a generic way which doesn't require us
> to hack each recipe. You can do it completely locally if you create a classes
> directory alongside your conf directory and place the .bbclass there, then add
> INHERIT += "urlremapper" in local.conf.
>
> Cheers,
>
> Richard
>
Richard,
I understand your point. And this newer solution should work. If possible I would like to push this class in the oecore layer so that I don't have to maintain it myself. Also can this be done selectively for a BSP by using the bspname override?
Thanks,
Nitin
More information about the Openembedded-core
mailing list