summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2017-06-26 08:52:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 15:11:12 +0100
commit667c43354e38c2fec1829089de0b7de076498e85 (patch)
treec3582ecf97c2d71087f860ae3d3275304396b1df
parentb02b54192ce71606aac30c21f3ff2199fa70a529 (diff)
downloadopenembedded-core-667c43354e38c2fec1829089de0b7de076498e85.tar.gz
openembedded-core-667c43354e38c2fec1829089de0b7de076498e85.tar.bz2
openembedded-core-667c43354e38c2fec1829089de0b7de076498e85.zip
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: 9b34200048b3d2b477a19b7ddc8d447f873adbb2) 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> (cherry picked from commit 877d38db08aa7060d16405443cf70539c559fe82) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/lib/oe/package_manager.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a20bbd438a..b74c8599eb 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -592,6 +592,7 @@ class PackageManager(object, metaclass=ABCMeta):
pkgs = self.list_installed()
output = oe.utils.format_pkg_list(pkgs, "arch")
installed_pkgs.write(output)
+ installed_pkgs.flush()
cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
"-p", self.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs.name,