All of
 help / color / mirror / Atom feed
* Enforcing version constraints on dependencies at build-time
@ 2017-04-04 20:26 Matt Hoosier
  2017-04-04 21:07 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Hoosier @ 2017-04-04 20:26 UTC (permalink / raw)
  To: yocto

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

The RDEPENDS variable supports giving numeric version bounds. For example:

  RDEPENDS_${PN} = "foo (>= 1.3)"

That works well for getting version dependencies respected at rootfs time.
But DEPENDS (used at build-time) silently ignores any similar constraint
arguments. For example:

  DEPENDS = "foo (>= 1.3)"

will not cause a recipe to be skipped if foo is present only at some
version less than 1.3.

I've tried a couple of workarounds in functions like so:

  python () {
    # Pseudocode. Version-number parsing would have to be done.
    if d.getVar('PV_pn-foo', True) < '1.3':
      raise bb.parse.SkipException('...')

but ${PV_pn-foo} always just evaluates to None. I think this is because of
the well-defined boundaries between instantiations of variables in one
recipe and the next.

Is there any way to escape that isolation and express version boundaries?


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

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

end of thread, other threads:[~2017-04-04 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 20:26 Enforcing version constraints on dependencies at build-time Matt Hoosier
2017-04-04 21:07 ` Burton, Ross

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.