* [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
* Re: [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files.
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
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Trofimovich @ 2014-07-26 7:15 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: mgorny
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
On Sat, 26 Jul 2014 08:50:43 +0200
Michał Górny <mgorny@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-portage-dev] [PATCH v2] QA: use pngfix to find broken PNG files.
2014-07-26 7:15 ` Sergei Trofimovich
@ 2014-08-06 21:05 ` Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2014-08-06 21:05 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] QA: use pngfix to find broken PNG files.
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-11 21:04 ` Michał Górny
1 sibling, 0 replies; 4+ messages in thread
From: Michał Górny @ 2014-08-11 21:04 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
Dnia 2014-07-26, o godz. 08:50:43
Michał Górny <mgorny@gentoo.org> napisał(a):
> ---
> bin/misc-functions.sh | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
This one's in git too.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [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