diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-04-09 13:54:35 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-08-11 22:33:28 +0200 |
commit | 98e84ba7b3939f314f61a2e1f4ce756e5cdb4009 (patch) | |
tree | ff67853bc1f29627a26754efce405525547ff3e2 /bin/misc-functions.sh | |
parent | Enable consistent __future__ behavior for division (diff) | |
download | portage-98e84ba7b3939f314f61a2e1f4ce756e5cdb4009.tar.gz portage-98e84ba7b3939f314f61a2e1f4ce756e5cdb4009.tar.bz2 portage-98e84ba7b3939f314f61a2e1f4ce756e5cdb4009.zip |
QA: Use pngfix to find broken PNG files
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
Acked-by: Brian Dolbec <dolsen@gentoo.org>
Reviewed-by: Justin Lecher <jlec@gentoo.org>
Reviewed-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-x | bin/misc-functions.sh | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 5ccf7c224..4e0f1fcb2 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Miscellaneous shell functions that make use of the ebuild env but don't need @@ -860,6 +860,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}" -type f -name '*.png' -exec "${pngfix}" {} +) + fi } install_qa_check_prefix() { |