diff options
| -rw-r--r-- | meta/classes/image_types_wic.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass index 519aeb1b04..f350dc2723 100644 --- a/meta/classes/image_types_wic.bbclass +++ b/meta/classes/image_types_wic.bbclass | |||
| @@ -77,6 +77,11 @@ python do_write_wks_template () { | |||
| 77 | wks_file = d.getVar('WKS_FULL_PATH') | 77 | wks_file = d.getVar('WKS_FULL_PATH') |
| 78 | with open(wks_file, 'w') as f: | 78 | with open(wks_file, 'w') as f: |
| 79 | f.write(template_body) | 79 | f.write(template_body) |
| 80 | f.close() | ||
| 81 | # Copy the finalized wks file to the deploy directory for later use | ||
| 82 | depdir = d.getVar('IMGDEPLOYDIR') | ||
| 83 | basename = d.getVar('IMAGE_BASENAME') | ||
| 84 | bb.utils.copyfile(wks_file, "%s/%s" % (depdir, basename + '-' + os.path.basename(wks_file))) | ||
| 80 | } | 85 | } |
| 81 | 86 | ||
| 82 | python () { | 87 | python () { |
| @@ -105,7 +110,7 @@ python () { | |||
| 105 | # file in process_wks_template as well, so just put it in | 110 | # file in process_wks_template as well, so just put it in |
| 106 | # a variable and let the metadata deal with the deps. | 111 | # a variable and let the metadata deal with the deps. |
| 107 | d.setVar('_WKS_TEMPLATE', body) | 112 | d.setVar('_WKS_TEMPLATE', body) |
| 108 | bb.build.addtask('do_write_wks_template', 'do_image_wic', None, d) | 113 | bb.build.addtask('do_write_wks_template', 'do_image_wic', 'do_image', d) |
| 109 | bb.build.addtask('do_image_wic', 'do_image_complete', None, d) | 114 | bb.build.addtask('do_image_wic', 'do_image_complete', None, d) |
| 110 | } | 115 | } |
| 111 | 116 | ||
| @@ -127,6 +132,10 @@ python do_rootfs_wicenv () { | |||
| 127 | value = d.getVar(var) | 132 | value = d.getVar(var) |
| 128 | if value: | 133 | if value: |
| 129 | envf.write('%s="%s"\n' % (var, value.strip())) | 134 | envf.write('%s="%s"\n' % (var, value.strip())) |
| 135 | envf.close() | ||
| 136 | # Copy .env file to deploy directory for later use with stand alone wic | ||
| 137 | depdir = d.getVar('IMGDEPLOYDIR') | ||
| 138 | bb.utils.copyfile(os.path.join(outdir, basename) + '.env', os.path.join(depdir, basename) + '.env') | ||
| 130 | } | 139 | } |
| 131 | addtask do_rootfs_wicenv after do_image before do_image_wic | 140 | addtask do_rootfs_wicenv after do_image before do_image_wic |
| 132 | do_rootfs_wicenv[vardeps] += "${WICVARS}" | 141 | do_rootfs_wicenv[vardeps] += "${WICVARS}" |
