All of lore.kernel.org
 help / color / mirror / Atom feed
* Skipping network-required recipes automatically?
@ 2019-12-19 15:03 Joel A Cohen
  2019-12-19 17:15 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Joel A Cohen @ 2019-12-19 15:03 UTC (permalink / raw)
  To: yocto

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

Hi all,

My layer has a bunch of "development" recipes that contain something like:

PV = "1.1.2+git${SRCPV}"
SRCREV = "${AUTOREV}"
DEFAULT_PREFERENCE = "-1"


In these cases, my recipes have a "known good" version that has a specific
known-good version number (recipe_1.1.2.bb), and then the "recipe_git.bb"
file that I only enable using PREFERRED_VERSION when I'm wanting to use the
latest source code.

My problem with this is that it seems to defeat BB_NO_NETWORK, and I'm not
sure how to handle it. I would like my layer to work correctly with no
network, but the mere presence of these development recipes causes my build
to fail during parsing if the network is not available.

My last failed attempt was to create a "skip-git" class that I inherit in
local.conf with the following:

python () {
    no_network = d.getVar('BB_NO_NETWORK')
    pn = d.getVar('PN')
    pv = d.getVar('PV')

    if no_network and 'git' in pv:
        raise bb.parse.SkipRecipe("Recipe requires git, but no network:
%s-%s" % (pn, pv))
}


Unfortunately, bitbake seems to fail in data_smart.py before my class
actually has a chance to skip the recipe even in this case.

Is there a better way to handle this?

Thanks,
Aaron

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

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

end of thread, other threads:[~2019-12-19 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 15:03 Skipping network-required recipes automatically? Joel A Cohen
2019-12-19 17:15 ` [yocto] " 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.