public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files.
@ 2014-07-26  6:50 Michał Górny
  2014-07-26  7:15 ` Sergei Trofimovich
  2014-08-11 21:04 ` [gentoo-portage-dev] [PATCH] " Michał Górny
  0 siblings, 2 replies; 4+ messages in thread
From: Michał Górny @ 2014-07-26  6:50 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

---
 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-11 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [gentoo-portage-dev] [PATCH v2] " Michał Górny
2014-08-11 21:04 ` [gentoo-portage-dev] [PATCH] " Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox