9

I want to force-recompile a package, like that:

bitbake -f -c compile mypackage

However, I also want all following tasks to be executed (like install, package, etc.), just as if I had called bitbake mypackage from a completely clean state. Can this be done in one step, rather than the following two?

bitbake -f -c compile mypackage
bitbake mypackage

Or as an alternative solution, can I somehow "taint" the compile-task, such that executing bitbake mypackage does everything from compilation onwards?

Georg P.
  • 2,785
  • 2
  • 27
  • 53

1 Answers1

15

This is exactly what -C is for:

bitbake -C compile mypackage

This will run mypackage:do_build and force mypackage:do_compile to execute. Strictly speaking, it taints mypackage:do_compile (so that it has to execute) and then executes mypackage:do_build, which is exactly what you wanted.

Ross Burton
  • 3,516
  • 13
  • 12
  • 1
    What does tainting mean in this respect? – CivFan Apr 15 '20 at 23:20
  • 'contaminate or pollute (something).'. Mark it as dirty, which means it has to be re-executed. – Ross Burton Apr 17 '20 at 10:41
  • @RossBurton - Can I do the same for the `mypackage:do_install` task? Meaning, say at the first time I built the entire package by executing `bitbake mypackage`. Then I (manually) changed the implementation of the `do_install` task so that, for example, it will remove (`rm -f`) some files that `mypacakge` installs in the final image root FS. Can I do that to the `do_install"? Will it be as follows: `bitbake -C install mypackage`? – Guy Avraham Jul 19 '23 at 12:43
  • Yes, but if you changed the recipe then just `bitbake mypackage` will work fine. – Ross Burton Jul 20 '23 at 13:56