[yocto] Ignoring Fetch errors for optional source.
Beth 'pidge' Flanagan
pidge at toganlabs.com
Wed Dec 7 05:13:45 PST 2016
On Wed, 2016-12-07 at 13:08 +0000, Burton, Ross wrote:
>
> On 7 December 2016 at 13:00, Beth 'pidge' Flanagan
> om> wrote:
> > I've an odd use case that I wonder if anyone has a work around/way
> > of
> > doing it.
> >
> > I've a client who has contractors who can't have access to a
> > certain
> > segment of the code base. So for example, a recipe will have a
> > SRC_URI
> > for the main bit that everyone has access to, but an extra src_uri
> > that
> > some people won't have access to.
> >
> > I want to be able to just ignore any fetch/unpack errors if that
> > extra
> > src is unfetchable. Thoughts on how to achieve this?
> >
> One solution would be to have a global variable I_AM_SPECIAL which
> the recipes can use:
>
> SRC_URI = "http://public.com/tarball.tar.gz
> ${@oe.types.boolean(d.getVar("I_AM_SPECIAL")) and
> 'http://private.com/tarball.tar.gz'}"
Yeah, unfortunately, people don't neccessarily know they're special if
you get my meaning.
One way we've been trying this is like so:
try:
fetcher = bb.fetch2.Fetch(extra_uri, d)
fetcher.download()
except:
pass
But this doesn't seem to be catching the fetch error.
-b
> > That might work, and also add determinism.
> > Ross
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161207/84ed1be2/attachment.html>
More information about the yocto
mailing list