summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorbrian avery <brian.avery@intel.com>2017-04-19 12:49:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-20 07:55:26 +0100
commita6275df081d9478d38b5ef868df9c48b23676519 (patch)
tree93d41c8e66961eaca29b06790ea24014aacdbffd /meta
parentecd485650c5b8d72df726258d9b347626ba26165 (diff)
downloadpoky-a6275df081d9478d38b5ef868df9c48b23676519.tar.gz
rootfs-postcommands.bbclass: save relative paths
We pass the TOPDIR to do a search/replace in export2json so that we save relative paths in the testdata.json file rather than absolute paths. This is to allow the images and kernels to be relocated yet still allow testimage to work. [YOCTO #11375] (From OE-Core rev: 7f9f1bdd714fbc6b2adc62f64bf0e4fd1d98ce05) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index c42829dd65..498174a664 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -132,7 +132,7 @@ zap_empty_root_password () {
132 if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then 132 if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
133 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd 133 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
134 fi 134 fi
135} 135}
136 136
137# 137#
138# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string 138# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
@@ -243,7 +243,7 @@ python write_image_manifest () {
243 os.symlink(os.path.basename(manifest_name), manifest_link) 243 os.symlink(os.path.basename(manifest_name), manifest_link)
244} 244}
245 245
246# Can be use to create /etc/timestamp during image construction to give a reasonably 246# Can be use to create /etc/timestamp during image construction to give a reasonably
247# sane default time setting 247# sane default time setting
248rootfs_update_timestamp () { 248rootfs_update_timestamp () {
249 date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp 249 date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
@@ -286,6 +286,7 @@ rootfs_sysroot_relativelinks () {
286 sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT} 286 sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
287} 287}
288 288
289
289# Generated test data json file 290# Generated test data json file
290python write_image_test_data() { 291python write_image_test_data() {
291 from oe.data import export2json 292 from oe.data import export2json
@@ -294,7 +295,8 @@ python write_image_test_data() {
294 testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_LINK_NAME')) 295 testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_LINK_NAME'))
295 296
296 bb.utils.mkdirhier(os.path.dirname(testdata)) 297 bb.utils.mkdirhier(os.path.dirname(testdata))
297 export2json(d, testdata) 298 searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
299 export2json(d, testdata,searchString=searchString,replaceString="")
298 300
299 if os.path.lexists(testdata_link): 301 if os.path.lexists(testdata_link):
300 os.remove(testdata_link) 302 os.remove(testdata_link)