diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2022-04-07 16:31:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-22 16:12:18 +0100 |
commit | fd344392501a112f1b22caae0f0a097b03e35322 (patch) | |
tree | 407100f79d2dac251df929009bf65893e9255a89 | |
parent | 0abe6ebd002dbe24b9d55462e6597f4702cb24d2 (diff) | |
download | poky-fd344392501a112f1b22caae0f0a097b03e35322.tar.gz |
license_image.bbclass: close package.manifest file
* fixes:
NOTE: Executing write_package_manifest ...
DEBUG: Executing python function write_package_manifest
/OE/build/oe-core/openembedded-core/meta/classes/license_image.bbclass:23: ResourceWarning: unclosed file <_io.TextIOWrapper name='/OE/build/oe-core/tmp-glibc/deploy/licenses/core-image-minimal-qemux86-64/package.manifest' mode='w+' encoding='UTF-8'>
'w+').write(output)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
DEBUG: Python function write_package_manifest finished
[YOCTO #14772]
(From OE-Core rev: 4c556b4fd07a3ce9128019b51e5623e8eeeb7400)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b3114d5d438b7a63a276b4e825b62f3b1ebceed6)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/license_image.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index 5490d121f1..150e8174f1 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass | |||
@@ -19,8 +19,8 @@ python write_package_manifest() { | |||
19 | 19 | ||
20 | pkgs = image_list_installed_packages(d) | 20 | pkgs = image_list_installed_packages(d) |
21 | output = format_pkg_list(pkgs) | 21 | output = format_pkg_list(pkgs) |
22 | open(os.path.join(license_image_dir, 'package.manifest'), | 22 | with open(os.path.join(license_image_dir, 'package.manifest'), "w+") as package_manifest: |
23 | 'w+').write(output) | 23 | package_manifest.write(output) |
24 | } | 24 | } |
25 | 25 | ||
26 | python license_create_manifest() { | 26 | python license_create_manifest() { |