From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH v2 3/4] Use ctime in cache post-postinst checks
Date: Wed, 16 Aug 2017 20:09:13 +0200 [thread overview]
Message-ID: <20170816180914.11073-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20170816180914.11073-1-mgorny@gentoo.org>
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.
---
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}" )
--
2.14.1
next prev parent reply other threads:[~2017-08-16 18:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 18:09 [gentoo-portage-dev] [PATCH v2 1/4] Support post-postinst QA checks Michał Górny
2017-08-16 18:09 ` [gentoo-portage-dev] [PATCH v2 2/4] Add post-postinst checks for a few missed cache updates Michał Górny
2017-08-16 18:09 ` Michał Górny [this message]
2017-08-16 18:09 ` [gentoo-portage-dev] [PATCH v2 4/4] Update caches after reporting missing " Michał Górny
2017-08-26 21:18 ` [gentoo-portage-dev] [PATCH v2 1/4] Support post-postinst QA checks Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170816180914.11073-3-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox