public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
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] QA: use pngfix to find broken PNG files.
Date: Wed,  6 Aug 2014 23:05:37 +0200	[thread overview]
Message-ID: <1407359137-18741-1-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <20140726101533.779d0489@sf>

---
 bin/misc-functions.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index f24e78c..5477e9c 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -875,6 +875,33 @@ 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:"
+					next=1
+				fi
+				eqawarn "   ${pngout[@]:7}: ${error}"
+			fi
+		done < <(find "${ED}" -name '*.png' -exec "${pngfix}" {} +)
+	fi
 }
 
 install_qa_check_prefix() {
-- 
2.0.4



  reply	other threads:[~2014-08-06 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26  6:50 [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files Michał Górny
2014-07-26  7:15 ` Sergei Trofimovich
2014-08-06 21:05   ` Michał Górny [this message]
2014-08-11 21:04 ` 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=1407359137-18741-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