Go to file
Thomas Petazzoni 0e2be4db8a package/pkg-generic: make file list logic parallel build compatible
The current solution used to collect the list of files installed by
packages does not work for top-level parallel build. Indeed, we rely
on a file created after the installation of the previous package to
build the list of files installed by the current package.

This works well when packages are built sequentially, but badly fails
when using top-level parallel build.

More specifically, top-level parallel build can fail with:

comm: /home/thomas/buildroot/output/build/.files-list-host.new: No such file or directory

Because that file has been removed concurrently by the build process
of another package.

This commit reworks the logic in a very straight-forward way. Before
the installation of each package, we store the list of files that are
already installed and store it in the package build directory. After
the installation of each package, we store again that list of files,
calculate the difference with the before file, and store that as the
list of files installed by that package, still in the package build
directory.

At the end of the build, in target-finalize we collect all the
collected information into the global package file lists, that
continue to be installed in the same location as before, with the same
name.

There are however some differences:

 (1) The files are no longer ordered in build order, but by alphabetic
     ordering of packages. Indeed, "build order" no longer makes any
     sense in the context of top-level parallel build.

 (2) Some files which were incorrectly tracked are no longer
     tracked. For example, the toolchain package is a target package,
     but it installs files in $(HOST_DIR). In the previous logic, the
     files installed by the toolchain package in $(HOST_DIR) were
     incorrectly affected to the next host package that was installed
     after the toolchain package. With our new logic, those files are
     no longer tracked at all. To fix this, we would have to change
     the logic to scan HOST_DIR/TARGET_DIR/STAGING_DIR for all
     installation steps, not just for the install-host, install-target
     and install-staging steps respecitively. But the result was
     already incorrect anyway, and therefore this should be fixed
     separately.

Note that the check_bin_arch hook needs to be adjusted: it was using
the global package-file-list.txt file, but this file is now created
only at the very end of the build. So instead, we use the current
package .file-list.txt file to know which packages have been installed
by the current package in $(TARGET_DIR).

Fixes:

  http://autobuild.buildroot.net/results/4e60fa31b1cd08bc7fdf9c5dd3a3f4941e029ba3/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-27 22:46:20 +01:00
arch arch/arc: explicitly set "max-page-size" for GNU LD 2019-12-25 22:09:52 +01:00
board board/freescale: use correct ahab-container.img file name 2020-02-26 22:27:59 +01:00
boot boot/arm-trusted-firmware: add missing qstrip 2020-02-11 23:37:31 +01:00
configs configs/beaglebone_qt5_defconfig: kernel builds needs host-openssl 2020-02-27 09:04:37 +01:00
docs Update for 2020.02-rc2 2020-02-26 17:18:34 +01:00
fs fs: don't use := when not needed 2019-10-27 10:35:06 +01:00
linux package/aufs: add support for linux 5.x 2020-02-26 20:51:45 +01:00
package package/pkg-generic: make file list logic parallel build compatible 2020-02-27 22:46:20 +01:00
support support/testing: add libftdi1 test case 2020-02-23 11:12:09 +01:00
system Revert "system: don't attempt swapon/swapoff in inittab if not available" 2020-02-08 20:13:07 +01:00
toolchain toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_93847 2020-02-26 21:56:25 +01:00
utils utils/check-package: ignore ACLOCAL_PATH 2020-02-04 17:15:19 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml support/testing: add libftdi1 test case 2020-02-23 11:12:09 +01:00
.gitlab-ci.yml.in gitlab-ci: use our updated docker base image 2019-10-27 21:52:28 +01:00
CHANGES Update for 2020.02-rc2 2020-02-26 17:18:34 +01:00
Config.in Config.in: add BR2_HOST_GCC_AT_LEAST_9 2020-02-25 23:21:50 +01:00
Config.in.legacy package/qt5: drop 5.6 support 2020-02-26 16:19:34 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS support/testing: add libftdi1 test case 2020-02-23 11:12:09 +01:00
Makefile package/pkg-generic: make file list logic parallel build compatible 2020-02-27 22:46:20 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches