commit: 028e76a38749c38e3661a204a5aaa5962fd55410 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Aug 16 16:05:31 2017 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat Aug 26 21:16:15 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=028e76a3
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 <zmedico <AT> gentoo.org> 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}" )