All of lore.kernel.org
 help / color / mirror / Atom feed
* Ignoring Fetch errors for optional source.
@ 2016-12-07 13:00 Beth 'pidge' Flanagan
  2016-12-07 13:08 ` Burton, Ross
  2016-12-12  7:44 ` Khem Raj
  0 siblings, 2 replies; 5+ messages in thread
From: Beth 'pidge' Flanagan @ 2016-12-07 13:00 UTC (permalink / raw)
  To: yocto

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?

-b

-- 
Beth 'pidge' Flanagan <pidge@toganlabs.com>
www.toganlabs.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ignoring Fetch errors for optional source.
  2016-12-07 13:00 Ignoring Fetch errors for optional source Beth 'pidge' Flanagan
@ 2016-12-07 13:08 ` Burton, Ross
  2016-12-07 13:13   ` Beth 'pidge' Flanagan
  2016-12-12  7:44 ` Khem Raj
  1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-12-07 13:08 UTC (permalink / raw)
  To: pidge; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

On 7 December 2016 at 13:00, Beth 'pidge' Flanagan <pidge@toganlabs.com>
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'}"

That might work, and also add determinism.

Ross

[-- Attachment #2: Type: text/html, Size: 1544 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ignoring Fetch errors for optional source.
  2016-12-07 13:08 ` Burton, Ross
@ 2016-12-07 13:13   ` Beth 'pidge' Flanagan
  2016-12-07 20:14     ` Andre McCurdy
  0 siblings, 1 reply; 5+ messages in thread
From: Beth 'pidge' Flanagan @ 2016-12-07 13:13 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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
> 

[-- Attachment #2: Type: text/html, Size: 2245 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ignoring Fetch errors for optional source.
  2016-12-07 13:13   ` Beth 'pidge' Flanagan
@ 2016-12-07 20:14     ` Andre McCurdy
  0 siblings, 0 replies; 5+ messages in thread
From: Andre McCurdy @ 2016-12-07 20:14 UTC (permalink / raw)
  To: pidge; +Cc: yocto

On Wed, Dec 7, 2016 at 5:13 AM, Beth 'pidge' Flanagan
<pidge@toganlabs.com> wrote:
>
> 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.

Even if it did work, how is sstate etc going to handle the effective
SRC_URI not being known until after you've tried to fetch all the
sources?

Perhaps better to run a test for "specialness" and set an
"I_AM_SPECIAL" variable from (a wrapper for) oe-init-build-env.

> -b
>
>
> That might work, and also add determinism.
>
> Ross
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ignoring Fetch errors for optional source.
  2016-12-07 13:00 Ignoring Fetch errors for optional source Beth 'pidge' Flanagan
  2016-12-07 13:08 ` Burton, Ross
@ 2016-12-12  7:44 ` Khem Raj
  1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-12-12  7:44 UTC (permalink / raw)
  To: pidge; +Cc: yocto


> On Dec 7, 2016, at 5:00 AM, Beth 'pidge' Flanagan <pidge@toganlabs.com> 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?

You can  append them via bbappends in a layer of its own. and control the access
to that layer. If the layer does not exist in bblayers then those repos dont bother fetching

if  there is a case where these additional stuff is must have then define

SRC_URI += “${ADDITIONAL_URIS}”
ADDITIONAL_URIS ? = “”

and let the layers fill this variables via bbappend and if it turns out to be empty in the end
you can raise parse errors,

basically look into RDK, there are several examples of such cases.

> 
> -b
> 
> -- 
> Beth 'pidge' Flanagan <pidge@toganlabs.com>
> www.toganlabs.com
> 
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-12  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 13:00 Ignoring Fetch errors for optional source Beth 'pidge' Flanagan
2016-12-07 13:08 ` Burton, Ross
2016-12-07 13:13   ` Beth 'pidge' Flanagan
2016-12-07 20:14     ` Andre McCurdy
2016-12-12  7:44 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.