Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] gnome2-utils postinst: Restrict file types to fix false positives
Date: Tue, 29 Aug 2017 16:30:27
Message-Id: 20170829093016.50fc086f@professor-x
In Reply to: [gentoo-portage-dev] [PATCH] gnome2-utils postinst: Restrict file types to fix false positives by "Michał Górny"
1 On Tue, 29 Aug 2017 10:20:40 +0200
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Restrict the file types checked by the gtk-icon-cache-update check
5 > to match the one used inside the tool. This ensures that we do not
6 > report any false positives for files that are intentionally skipped.
7 >
8 > Bug: https://bugs.gentoo.org/629148
9 > ---
10 > bin/postinst-qa-check.d/50gnome2-utils | 7 ++++++-
11 > 1 file changed, 6 insertions(+), 1 deletion(-)
12 >
13 > diff --git a/bin/postinst-qa-check.d/50gnome2-utils
14 > b/bin/postinst-qa-check.d/50gnome2-utils index d0cbb4037..84025ab83
15 > 100644 --- a/bin/postinst-qa-check.d/50gnome2-utils
16 > +++ b/bin/postinst-qa-check.d/50gnome2-utils
17 > @@ -6,7 +6,12 @@ gnome2_icon_cache_check() {
18 > # gnome2_icon_cache_update updates only themes with
19 > an index [[ -f ${d}/index.theme ]] || continue
20 >
21 > - find_args=()
22 > + find_args=(
23 > + # gtk-update-icon-cache supports only
24 > specific file
25 > + # suffixes; match that to avoid false
26 > positives
27 > + '(' -name '*.png' -o -name '*.svg'
28 > + -o -name '*.xpm' -o -name '*.icon'
29 > ')'
30 > + )
31 > # if the cache does not exist at all, we complain
32 > for any file # otherwise, we look for files newer than the cache
33 > [[ -f ${d}/icon-theme.cache ]] &&
34
35 Works for me, since Gilles approved the change :)
36
37 --
38 Brian Dolbec <dolsen>