For a recipe that uses more than one git repo there isn't a single
SRCREV variable. For example for linux-yocto there is SRCREV_machine and
SRCREV_meta and rd.getVar("SRCREV") yields "INVALID".
Luckily bb.fetch2 already handles all the details and exposes the
currently used revision in ud. So just use that.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
try:
revision = ud.method.latest_revision(ud, rd, 'default')
upversion = pv
- if revision != rd.getVar("SRCREV"):
+ if revision != ud.revision:
upversion = upversion + "-new-commits-available"
except bb.fetch2.FetchError as e:
bb.warn("Unable to obtain latest revision: {}".format(e))