From 028e76a38749c38e3661a204a5aaa5962fd55410 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 16 Aug 2017 18:05:31 +0200 Subject: Use ctime in cache post-postinst checks Use ctime rather than mtime in cache post-postinst checks since mtime may be preserved from the original tarball, and therefore be 'long time ago'. ctime is more reliable in this regard. Reviewed-by: Zac Medico --- bin/postinst-qa-check.d/50gnome2-utils | 2 +- bin/postinst-qa-check.d/50xdg-utils | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils index 68e21cb74..4e7c6eb85 100644 --- a/bin/postinst-qa-check.d/50gnome2-utils +++ b/bin/postinst-qa-check.d/50gnome2-utils @@ -10,7 +10,7 @@ gnome2_icon_cache_check() { # if the cache does not exist at all, we complain for any file # otherwise, we look for files newer than the cache [[ -f ${d}/icon-theme.cache ]] && - find_args+=( -newer "${d}"/icon-theme.cache ) + find_args+=( -newercm "${d}"/icon-theme.cache ) # (use -mindepth 2 to easily skip the cache files) while read -r -d $'\0' f; do diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils index 4bc7bee9a..b0bb029bd 100644 --- a/bin/postinst-qa-check.d/50xdg-utils +++ b/bin/postinst-qa-check.d/50xdg-utils @@ -9,7 +9,7 @@ xdg_desktop_database_check() { # if the cache does not exist at all, we complain for any file # otherwise, we look for files newer than the cache [[ -f ${d}/mimeinfo.cache ]] && - find_args+=( -newer "${d}"/mimeinfo.cache ) + find_args+=( -newercm "${d}"/mimeinfo.cache ) # look for any .desktop files that are newer than the cache # and that have any mime types defined @@ -37,7 +37,7 @@ xdg_mimeinfo_database_check() { # if the cache does not exist at all, we complain for any file # otherwise, we look for files newer than the cache [[ -f ${d}/mime.cache ]] && - find_args+=( -newer "${d}"/mime.cache ) + find_args+=( -newercm "${d}"/mime.cache ) while read -r -d $'\0' f; do files+=( "${f}" ) -- cgit v1.2.3-65-gdbad