summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-02-19 12:13:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-20 14:28:11 +0000
commit7e595a5f9432188f5adec99e675827114c70d0c8 (patch)
treea95750876722f852100ec8af6f975b0aff82c8ca /meta/classes/buildhistory.bbclass
parent1988f7186bd0b502172bf32b2c7c75cdc8b37a4e (diff)
downloadpoky-7e595a5f9432188f5adec99e675827114c70d0c8.tar.gz
buildhistory.bbclass: fix creation of installed packages list
Call the new python routines to create the packages list. [YOCTO #5831] (From OE-Core rev: e8bd5b85f144a3260e30f67c3d231b324967be3f) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass21
1 files changed, 17 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 0033b5af83..ef4135b1fd 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -311,13 +311,23 @@ def write_pkghistory(pkginfo, d):
311 if os.path.exists(filevarpath): 311 if os.path.exists(filevarpath):
312 os.unlink(filevarpath) 312 os.unlink(filevarpath)
313 313
314python buildhistory_list_installed() {
315 from oe.rootfs import list_installed_packages
316
317 pkgs_list_file = os.path.join(d.getVar('WORKDIR', True),
318 "bh_installed_pkgs.txt")
319
320 with open(pkgs_list_file, 'w') as pkgs_list:
321 pkgs_list.write(list_installed_packages(d, 'file'))
322}
323
314 324
315buildhistory_get_installed() { 325buildhistory_get_installed() {
316 mkdir -p $1 326 mkdir -p $1
317 327
318 # Get list of installed packages 328 # Get list of installed packages
319 pkgcache="$1/installed-packages.tmp" 329 pkgcache="$1/installed-packages.tmp"
320 list_installed_packages file | sort > $pkgcache 330 cat ${WORKDIR}/bh_installed_pkgs.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs.txt
321 331
322 cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt 332 cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt
323 if [ -s $pkgcache ] ; then 333 if [ -s $pkgcache ] ; then
@@ -452,13 +462,16 @@ END
452} 462}
453 463
454# By prepending we get in before the removal of packaging files 464# By prepending we get in before the removal of packaging files
455ROOTFS_POSTPROCESS_COMMAND =+ "buildhistory_get_image_installed ; " 465ROOTFS_POSTPROCESS_COMMAND =+ " buildhistory_list_installed ;\
466 buildhistory_get_image_installed ; "
456 467
457IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; " 468IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
458 469
459# We want these to be the last run so that we get called after complementary package installation 470# We want these to be the last run so that we get called after complementary package installation
460POPULATE_SDK_POST_TARGET_COMMAND_append = "buildhistory_get_sdk_installed_target ; " 471POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed ;\
461POPULATE_SDK_POST_HOST_COMMAND_append = "buildhistory_get_sdk_installed_host ; " 472 buildhistory_get_sdk_installed_target ; "
473POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed ;\
474 buildhistory_get_sdk_installed_host ; "
462 475
463SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; " 476SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; "
464 477