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] QA: use pngfix to find broken PNG files.
Date: Sat, 26 Jul 2014 08:50:43 +0200 [thread overview]
Message-ID: <1406357443-12775-1-git-send-email-mgorny@gentoo.org> (raw)
---
bin/misc-functions.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index f24e78c..0a8ece0 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -875,6 +875,32 @@ install_qa_check() {
[[ ${abort} == yes ]] && die "multilib-strict check failed!"
fi
+
+ local pngfix=$(type -P pngfix)
+ if [[ -n ${pngfix} ]] ; then
+ local pngout=()
+ local next
+
+ while read -r -a pngout ; do
+ local error
+
+ case "${pngout[1]}" in
+ CHK)
+ error='invalid checksum'
+ ;;
+ TFB)
+ error='broken IDAT window length'
+ ;;
+ esac
+
+ if [[ -n ${error} ]] ; then
+ if [[ -z ${next} ]] ; then
+ eqawarn "QA Notice: broken .png files found:"
+ fi
+ eqawarn " ${pngout[@]:7}: ${error}"
+ fi
+ done < <(find "${ED}" -name '*.png' -exec "${pngfix}" {} +)
+ fi
}
install_qa_check_prefix() {
--
2.0.2
next reply other threads:[~2014-07-26 6:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-26 6:50 Michał Górny [this message]
2014-07-26 7:15 ` [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files Sergei Trofimovich
2014-08-06 21:05 ` [gentoo-portage-dev] [PATCH v2] " Michał Górny
2014-08-11 21:04 ` [gentoo-portage-dev] [PATCH] " 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=1406357443-12775-1-git-send-email-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