[gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files.

2014-07-26 Thread 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




Re: [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files.

2014-07-26 Thread Sergei Trofimovich
On Sat, 26 Jul 2014 08:50:43 +0200
Michał Górny mgo...@gentoo.org wrote:

 + if [[ -z ${next} ]] ; then
 + eqawarn QA Notice: broken .png files 
 found:

I guess you planned to plug 'next=yes' here, right?

 + fi


-- 

  Sergei


signature.asc
Description: PGP signature