diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2014-01-27 09:41:31 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-11 11:53:42 +0000 |
commit | 1a1ba04df7eed2f12ea65e75f65a7442dddc8103 (patch) | |
tree | ffe43855f59ddce12e3e29878c0b2affdc6b47d1 /meta | |
parent | f5d35ab6405e556badf54ae6f6c5138245e42ae6 (diff) | |
download | poky-1a1ba04df7eed2f12ea65e75f65a7442dddc8103.tar.gz |
image.bbclass/license.bbclass: ajustment list_installed_packages invoking
Since the list_installed_packages() function has refactored in
python, do the necessary adjustments to license_create_manifes-
t() and write_image_manifest() in license.bbclass and image.bb-
class respectively;
(From OE-Core rev: 4477991633d2971c17afbd0874b1ab2efb7d6eef)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/license.bbclass | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 04eb7f9510..e5ec42ce3d 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -343,8 +343,10 @@ make_zimage_symlink_relative () { | |||
343 | fi | 343 | fi |
344 | } | 344 | } |
345 | 345 | ||
346 | write_image_manifest () { | 346 | python write_image_manifest () { |
347 | list_installed_packages ver | sort > ${IMAGE_MANIFEST} | 347 | from oe.rootfs import list_installed_packages |
348 | with open(d.getVar('IMAGE_MANIFEST', True), 'w+') as image_manifest: | ||
349 | image_manifest.write(list_installed_packages(d, 'ver')) | ||
348 | } | 350 | } |
349 | 351 | ||
350 | # Make login manager(s) enable automatic login. | 352 | # Make login manager(s) enable automatic login. |
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index f075f59340..16cadf9e2c 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -16,10 +16,16 @@ addtask populate_lic after do_patch before do_build | |||
16 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" | 16 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" |
17 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" | 17 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" |
18 | 18 | ||
19 | license_create_manifest() { | 19 | python write_package_manifest() { |
20 | mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME} | ||
21 | # Get list of installed packages | 20 | # Get list of installed packages |
22 | list_installed_packages |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest | 21 | license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}') |
22 | bb.utils.mkdirhier(license_image_dir) | ||
23 | from oe.rootfs import list_installed_packages | ||
24 | open(os.path.join(license_image_dir, 'package.manifest'), | ||
25 | 'w+').write(list_installed_packages(d)) | ||
26 | } | ||
27 | |||
28 | license_create_manifest() { | ||
23 | INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` | 29 | INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` |
24 | LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest" | 30 | LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest" |
25 | # remove existing license.manifest file | 31 | # remove existing license.manifest file |
@@ -354,7 +360,7 @@ SSTATETASKS += "do_populate_lic" | |||
354 | do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" | 360 | do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" |
355 | do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/" | 361 | do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/" |
356 | 362 | ||
357 | ROOTFS_POSTPROCESS_COMMAND_prepend = "license_create_manifest; " | 363 | ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; " |
358 | 364 | ||
359 | python do_populate_lic_setscene () { | 365 | python do_populate_lic_setscene () { |
360 | sstate_setscene(d) | 366 | sstate_setscene(d) |