Re: gtk-update-icon-cache %posttrans (was Re: Error output from rpm pre/post scripts)

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

 



Panu Matilainen wrote:
On Thu, 5 Jul 2007, Toshio Kuratomi wrote:

On Thu, 2007-07-05 at 16:15 -0400, Matthias Clasen wrote:
On Thu, 2007-07-05 at 16:13 -0400, Jesse Keating wrote:
On Thursday 05 July 2007 16:15:02 Michael Thomas wrote:
What about adding 'Requires(post): coreutils' to bring in 'touch' for
the gtk+ icon cache scriptlet:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=246770

It seems excessive to me, because I can't imagine a situation where
coreutils would not get installed.  But I also haven't looked that
closely at the dependency tree either.

Often it's not about whether it will be installed or not, but rather it's about whether it will be installed /before/ your %pre/%post script is ran if the packages are in the same transaction (IE installer or big upgrades).


Now that we are discussing this again, I'd like to point out that the
recent ldconfig/%posttrans discussion is somewhat related to this. If
we can make %posttrans useful for ldconfig, we can use it for icon cache
updates too. That would be a big win.

That would be great.  Unfortunately, %posttrans doesn't work in the
ldconfig case because it doesn't run when only erasing packages.  Will
that make a difference for gtk-update-icon-cache as well?

Well, the cache wouldn't be updated when packages are removed so it would cache nonexistent icons. Dunno how bad that is in reality.

What both ldconfig and gtk-update-icon-cache really beg for is a system, not package-level scripts that do stuff after the transaction completes. Yum and apt both have such a mechanism, what's missing is one on plain rpm level.

Of course it would be possible to add some tracking mechanism ("touch need-ldconfig" style) but is it actually needed... I think not. It could be dirt simple like:

--
#!/bin/sh
/sbin/ldconfig
[ -x /usr/bin/gtk-update-icon-cache ] && /usr/bin/gtk-update-icon-cache

# any other similar stuff
--

That completes fast enough not to be noticeable *at all* when run just once at end of any transaction (the vast majority of the time spent will be in the transaction in all cases really), regardless of whether libraries or gtk-icon containing packages were installed or removed.

    - Panu -


I really like that solution to be honest. It avoids lots of unnecessary gtk-update-icon-cache calls during the update and only does it once at the end. Could something similar be done for the scrollkeeper-update calls as well btw? Or do they need to be done after each package install?

Read ya, Phil

--
Philipp Knirsch                  | Tel.:  +49-711-96437-470
Team Lead Core Services          | Fax.:  +49-711-96437-111
Red Hat GmbH                     | Email: Phil Knirsch <phil@xxxxxxxxxx>
Hauptstaetterstr. 58             | Web:   http://www.redhat.com/
D-70178 Stuttgart, Germany
Motd:  You're only jealous cos the little penguins are talking to me.

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux