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 12A6013877A for ; Wed, 6 Aug 2014 21:05:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B0FEE0833; Wed, 6 Aug 2014 21:05:11 +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 9E0E6E0806 for ; Wed, 6 Aug 2014 21:05:10 +0000 (UTC) Received: from pomiot.lan (77-255-25-239.adsl.inetia.pl [77.255.25.239]) (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 C480E340149; Wed, 6 Aug 2014 21:05:08 +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 v2] QA: use pngfix to find broken PNG files. Date: Wed, 6 Aug 2014 23:05:37 +0200 Message-Id: <1407359137-18741-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.0.4 In-Reply-To: <20140726101533.779d0489@sf> References: <20140726101533.779d0489@sf> 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: 6c7c474a-0fb3-45f3-8cef-d60a9fde131d X-Archives-Hash: 63adf1e8ac1c0f383f35a6bbe6dc9769 --- 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