From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D9AB013877A for ; Sat, 26 Jul 2014 06:50:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A81B2E0C24; Sat, 26 Jul 2014 06:50:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D9134E0C09 for ; Sat, 26 Jul 2014 06:50:37 +0000 (UTC) Received: from pomiot.lan (77-254-85-187.adsl.inetia.pl [77.254.85.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 2C1B933F7EE; Sat, 26 Jul 2014 06:50:35 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files. Date: Sat, 26 Jul 2014 08:50:43 +0200 Message-Id: <1406357443-12775-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.0.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: ffd31a92-115a-4871-b26e-5afae711d0de X-Archives-Hash: 6dc6562c243fa8c4fa4b1bd140630b34 --- 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