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

Re: Proposal (and yes, I'm willing to do stuff!): Must Use More Macros

On Fri, 2009-06-05 at 13:50 -0400, Ray Strode wrote:

> > It seems to me it'd make sense to convert all these kinds of snippets
> > into macros. Am I right, or is there a reason against doing this?
> It would be awesome to get rid of the boilerplate.  Honestly though,
> I'd rather the solution was "just works" than "replace giant glob of
> muck with %{glob_of_muck}"

Yes indeed, this would be best in many cases. Some can't really be done
like that, though - like the snippets for Tcl and Python to define the
version, directories for certain types of file and so on. They're
just...informational. Defining them as macros seems the optimal

> For instance, if a file gets dropped under /usr/share/icons/something
> rpm should run gtk-update-icon-cache /usr/share/icons/something
> automatically.
> the gtk2 package should be able to drop a file in /usr/lib/rpm/redhat
> that makes that happen.  likewise, desktop-file-utils should be able
> to drop a file there to make update-desktop-database get run and so
> on.
> I don't know how hard it would be to fix rpm to allow for that though.

This is definitely possible; Mandriva (I know I talk about MDV a lot,
I'm sorry, it's what I know! :>) does this, via an implementation called
'file triggers'. This is not yet upstream, though. 

The MDV patch that implements this is:


MDV's wiki discussion of it is here:


It appears to be something upstream has thought about several times.
Here's an RPM 5 community discussion of it, with Jeff Johnson's


Here's a discussion from the rpm.org Wiki:


I'm not sure what the current status is for rpm.org - whether they're
actively working on a solution for this side of things or what.

Oh, and please try to consider the original proposal in replies to this
thread, as I sense a derail coming :). file triggers is certainly an
interesting topic, but there are some snippets which just don't fit the
case, see above.
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Fedora Talk: adamwill AT fedoraproject DOT org

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