diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2017-05-30 07:48:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-14 14:53:58 +0100 |
commit | 1460e8aa99ffef3760e5f56ecd4741bce47c2201 (patch) | |
tree | cb36f465566971aae7cd3210063ab7fb12954b37 | |
parent | 38184d391b5224b261805696864d5d8109645f81 (diff) | |
download | poky-1460e8aa99ffef3760e5f56ecd4741bce47c2201.tar.gz |
package_manager: flush installed_pkgs file before oe-pkgdata-util uses it
* since this commit:
commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c
Author: Ross Burton <ross.burton@intel.com>
Date: Tue Apr 18 16:19:12 2017 +0100
package_manager: don't race on a file when installing complementary
packages
the file isn't closed before oe-pkgdata-util uses it and this
temporary file might look empty to oe-pkgdata-util, because it
wasn't flushed yet. Which resulted in almost empty debugfs tarballs
and no locale packages in regular rootfs.
* without this change:
124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz
* with this change:
173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz
(From OE-Core rev: 877d38db08aa7060d16405443cf70539c559fe82)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oe/package_manager.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index caccd7baa9..bc4e3013f0 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -399,6 +399,7 @@ class PackageManager(object, metaclass=ABCMeta): | |||
399 | pkgs = self.list_installed() | 399 | pkgs = self.list_installed() |
400 | output = oe.utils.format_pkg_list(pkgs, "arch") | 400 | output = oe.utils.format_pkg_list(pkgs, "arch") |
401 | installed_pkgs.write(output) | 401 | installed_pkgs.write(output) |
402 | installed_pkgs.flush() | ||
402 | 403 | ||
403 | cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), | 404 | cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), |
404 | "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, | 405 | "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, |