How does the beatbox work for source code?

I am new to bitback methods, and I wonder what happens in the following situations when creating a project with several thousand packages:

  • You destroy the full image (all packages) and successfully complete.
  • You make changes to the package β€” some source code (let him name the package β€œX”)
  • You clear the full image again.

In step 3, is the β€œX” rebuilt? Do I need to increase PV and PR for "X", which need to be rebuilt? What happens to the package "Y", which depends on the "X"? If X is rebuilt, is also "Y" rebuilt?

I know that if you modify the .bb file, dependent packages are not created because the timestamp is marked. Is this the same mechanism with source code changes? (This is a QT btw project, so at the end of the bitbuck, it starts qmake-> make to compile)

I am using bitbake version 1.13.2.

thanks

+6
source share
2 answers

Let me try to answer that. for example, you have a package of X, Y and Z. Let X depend on Y and Y depends on package Z.

  • If you make "bitbake default-image-name" and you build it as a scratch (this means that not a single package was created before that is required for the default image name). So, bitbake now creates a dependency tree (you can see the dependency tree on "bitbake -g PACKAGE_NAME".). The first package Z will be built, then Y, and then finally package X.

  • Now let's say that you made some changes to the source code of X, and you do a β€œbeatbot X” without increasing the PR number in the recipe file X (x.bb), the beatbox does not compile the changes again. I want to say that the beatbox just checks the package version and version (PV and PR). Here we have the same package version (PV) and the same Revision (PR) package, so the beatbox does not compile package X again.

To compile package X after some modification, you need to apply the changes as a patch. To do this, patch the changes (for example, change.diff or change.patch), add an entry to the X.bb file (see, for example, another recipe file). then increase the PR number in X.bb.

Now "bitbake X" will build package X again.

  • Here, when we increased the PR for X, we will only build package X. Here, bitbake will check the dependent packages Y and Z that are already built and have the same PR number, it will simply use the already built package Y and Z.

  • If we rebuilt package Y (you can clear the bitback package -c clear package_name if you don't want to increase the PR number), package X will not be built by default, even if it depends on Y.

I hope for this help.

+3
source

Bitbake depends on other compilation systems, such as make. make has the ability to detect the need to recompile a package. So Bitbake is recompiling the package.

0
source

Source: https://habr.com/ru/post/951028/


All Articles