[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

gtk-update-icon-cache scriptlet output?

recommends including scriptlet:
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
but *not* adding any Requires: for this.

A consequence is that when/if gtk-update-icon-cache is not available, the
existing scriptlet generates error output.

2 fixes come to mind:
1. ignore all output: (line wrapped)
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor \   
    >& /dev/null || :

2. wrap, allow for real errors to display:
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:

Any opinions on which approach (1 or 2 or other) is a preferred solution

Myself, I'd lean toward 1 (it's shorter), unless there's value in seeing
possible error output from gtk-update-icon-cache.

-- Rex

p.s.  Looking closer, it appears option 2 was in place at one time, but was
removed via
with comment:
Remove extraneous if [ -x PROGRAM ] (Not needed if the scriptlet also
uses ||:)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]