summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-01-18 14:33:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-20 17:07:15 +0000
commit6ebda8e659f678a0f4fe1e970d6f38e5e273f5f7 (patch)
tree3f3a48a5798b58defdfc9c812705da0bf7fd40fb /meta/classes/buildhistory.bbclass
parent03075f671c5425f08669f10f30330c4880c0d60a (diff)
downloadpoky-6ebda8e659f678a0f4fe1e970d6f38e5e273f5f7.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] (From OE-Core rev: 983ea373362514e5888bd1d7d9c4f136c94b00f2) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 2c144abb97..9f1744293a 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -337,18 +337,21 @@ def write_pkghistory(pkginfo, d):
337def buildhistory_list_installed(d, rootfs_type="image"): 337def buildhistory_list_installed(d, rootfs_type="image"):
338 from oe.rootfs import image_list_installed_packages 338 from oe.rootfs import image_list_installed_packages
339 from oe.sdk import sdk_list_installed_packages 339 from oe.sdk import sdk_list_installed_packages
340 from oe.utils import format_pkg_list
340 341
341 process_list = [('file', 'bh_installed_pkgs.txt'),\ 342 process_list = [('file', 'bh_installed_pkgs.txt'),\
342 ('deps', 'bh_installed_pkgs_deps.txt')] 343 ('deps', 'bh_installed_pkgs_deps.txt')]
343 344
345 if rootfs_type == "image":
346 pkgs = image_list_installed_packages(d)
347 else:
348 pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target")
349
344 for output_type, output_file in process_list: 350 for output_type, output_file in process_list:
345 output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file) 351 output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file)
346 352
347 with open(output_file_full, 'w') as output: 353 with open(output_file_full, 'w') as output:
348 if rootfs_type == "image": 354 output.write(format_pkg_list(pkgs, output_type))
349 output.write(image_list_installed_packages(d, output_type))
350 else:
351 output.write(sdk_list_installed_packages(d, rootfs_type == "sdk_target", output_type))
352 355
353python buildhistory_list_installed_image() { 356python buildhistory_list_installed_image() {
354 buildhistory_list_installed(d) 357 buildhistory_list_installed(d)