23587538 glib-compile-schemas svc goes into maintenance when there are no schemas
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sat, 13 Aug 2016 23:29:32 -0700
changeset 6613 7a9aec6e5daf
parent 6612 ab085eee934a
child 6614 ff27f2901f5d
23587538 glib-compile-schemas svc goes into maintenance when there are no schemas
components/gnome/glib2/files/glib-compile-schemas.sh
--- a/components/gnome/glib2/files/glib-compile-schemas.sh	Wed Aug 10 05:20:19 2016 -0700
+++ b/components/gnome/glib2/files/glib-compile-schemas.sh	Sat Aug 13 23:29:32 2016 -0700
@@ -76,11 +76,14 @@
 		exit $SMF_EXIT_ERR_FATAL
 	fi
 	if [[ ! -r "${COMPILED_FILE}" ]] ; then
-		exit $SMF_EXIT_ERR_FATAL
-	fi
+		if [[ -n "$(find ${SCHEMA_DIR} -name '*.gschema.xml')" ]] ; then
+			exit $SMF_EXIT_ERR_FATAL
+		fi
+	else
 	# Since glib-compile-schemas renames the result into place, update
 	# the file mtime after moving so it matches the directory mtime.
-	touch -c -r "${SCHEMA_DIR}" "${COMPILED_FILE}"
+		touch -c -r "${SCHEMA_DIR}" "${COMPILED_FILE}"
+	fi
 fi
 
 exit $SMF_EXIT_OK