Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: "Becker Béla" <bela@becker.rocks>
To: bitbake-devel@lists.openembedded.org
Subject: Forcing a task to run depending on the output of a python script?
Date: Thu, 10 May 2018 21:25:35 +0200	[thread overview]
Message-ID: <4772545.pSEQItiHMW@maxion> (raw)

My goal is to have a fancy version string, computed from my meta layer using versions of the `git describe` command, to be stored in the file system, but I can't figure out how I can invalidate the cache for my recipe in order for the do_install task to fire.

Currently, I'm using an anonymous python script instide a .bbclass to set up a variable ( let's call it ${VERSION} ) using git's numerous commands. This is then inherited in a .bb file, that contains a single file for the target, under /etc with my fancy string.

When I run `bitbake -e git-version`, I can see that leaving a commit changes the variable, but the package isn't rebuilt, not until I force it.

So far I have tried:
-setting `PV = ${VERSION}`
-changing the task basehash with `BB_BASEHASH_task-do_install += ${VERSION}`
-adding VERSION to do_install[vardeps]

Is it possible, to have this package be rebuilt when a change occurs, so the images will be rebuilt as well?


             reply	other threads:[~2018-05-10 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 19:25 Becker Béla [this message]
2018-05-15 13:11 ` Forcing a task to run depending on the output of a python script? Becker Béla

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=4772545.pSEQItiHMW@maxion \
    --to=bela@becker.rocks \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox