]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs-postcommands: check /etc/gconf exists before working on it
authorRoss Burton <ross.burton@intel.com>
Wed, 18 Sep 2019 12:16:40 +0000 (13:16 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Sep 2019 09:54:26 +0000 (10:54 +0100)
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>
meta/classes/rootfs-postcommands.bbclass

index fc338161c4d6d1482e6af369dbda6803f6d35b8d..88f75d0f442479899b73507af00ed64fc396cb3b 100644 (file)
@@ -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
 }