diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-01-18 14:33:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-20 09:20:05 +0000 |
commit | 983ea373362514e5888bd1d7d9c4f136c94b00f2 (patch) | |
tree | 67f16fdb709cb0ca76eafd7cd0569f18634f2ce2 /meta/classes/buildhistory.bbclass | |
parent | 25725e6e5fff8017aaf3a6fcd9b1b893c22630b5 (diff) | |
download | openembedded-core-contrib-983ea373362514e5888bd1d7d9c4f136c94b00f2.tar.gz |
lib/oe/rootfs: Use list_pkgs() instead of list()
This patch changes the use list_pkgs() instead of list()
from class RpmPkgsList. The change is in two functions,
image_list_installed_packages from rootfs.py and
sdk_list_installed_packages from sdk.py.
With this change the functions calling the functions
listed above, must format the output as they required.
The formatting can be done using format_pkg_list() from
oe.utils.
The classes calling the afected functions are changed too
with this patch, to keep the same functionality using the
new data structure.
[YOCTO #7427]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 2c144abb971..9f1744293a9 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -337,18 +337,21 @@ def write_pkghistory(pkginfo, d): def buildhistory_list_installed(d, rootfs_type="image"): from oe.rootfs import image_list_installed_packages from oe.sdk import sdk_list_installed_packages + from oe.utils import format_pkg_list process_list = [('file', 'bh_installed_pkgs.txt'),\ ('deps', 'bh_installed_pkgs_deps.txt')] + if rootfs_type == "image": + pkgs = image_list_installed_packages(d) + else: + pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target") + for output_type, output_file in process_list: output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file) with open(output_file_full, 'w') as output: - if rootfs_type == "image": - output.write(image_list_installed_packages(d, output_type)) - else: - output.write(sdk_list_installed_packages(d, rootfs_type == "sdk_target", output_type)) + output.write(format_pkg_list(pkgs, output_type)) python buildhistory_list_installed_image() { buildhistory_list_installed(d) |