diff options
author | Ross Burton <ross.burton@intel.com> | 2019-09-18 13:16:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-19 10:54:26 +0100 |
commit | 70a77b91031388ea29eff6b8885fd25cc35b1dae (patch) | |
tree | cb20f2034f97dc44bba00162539af99926d4cb52 /meta/classes/rootfs-postcommands.bbclass | |
parent | 58aa346673428132dacbc4cd060106b23c8edd71 (diff) | |
download | openembedded-core-contrib-70a77b91031388ea29eff6b8885fd25cc35b1dae.tar.gz |
rootfs-postcommands: check /etc/gconf exists before working on it
Check that /etc/gconf exists before trying to find files under it, to avoid
writing find error messages to the rootfs log.
Also use ${sysconfdir}/gconf instead of hardcoding /etc/gconf.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index fc338161c4..88f75d0f44 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass @@ -361,7 +361,9 @@ rootfs_reproducible () { echo $sformatted > ${IMAGE_ROOTFS}/etc/version bbnote "rootfs_reproducible: set /etc/version to $sformatted" - find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | xargs -0r \ - sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g' + if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then + find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name '%gconf.xml' -print0 | xargs -0r \ + sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g' + fi fi } |