All of
 help / color / mirror / Atom feed
From: Matt Hoosier <>
Subject: Enforcing version constraints on dependencies at build-time
Date: Tue, 4 Apr 2017 15:26:34 -0500	[thread overview]
Message-ID: <> (raw)

[-- 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 --]

             reply	other threads:[~2017-04-04 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 20:26 Matt Hoosier [this message]
2017-04-04 21:07 ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \
    --subject='Re: Enforcing version constraints on dependencies at build-time' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.