<div class="gmail_quote">On Fri, Jun 5, 2009 at 8:05 PM, Adam Williamson <span dir="ltr">&lt;<a href="mailto:awilliam@redhat.com">awilliam@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Fri, 2009-06-05 at 13:50 -0400, Ray Strode wrote:<br>
<br>
&gt; &gt; It seems to me it&#39;d make sense to convert all these kinds of snippets<br>
&gt; &gt; into macros. Am I right, or is there a reason against doing this?<br>
&gt; It would be awesome to get rid of the boilerplate.  Honestly though,<br>
&gt; I&#39;d rather the solution was &quot;just works&quot; than &quot;replace giant glob of<br>
&gt; muck with %{glob_of_muck}&quot;<br>
<br>
</div>Yes indeed, this would be best in many cases. Some can&#39;t really be done<br>
like that, though - like the snippets for Tcl and Python to define the<br>
version, directories for certain types of file and so on. They&#39;re<br>
just...informational. Defining them as macros seems the optimal<br>
solution.<br>
<div class="im"><br>
&gt; For instance, if a file gets dropped under /usr/share/icons/something<br>
&gt; rpm should run gtk-update-icon-cache /usr/share/icons/something<br>
&gt; automatically.<br>
&gt;<br>
&gt; the gtk2 package should be able to drop a file in /usr/lib/rpm/redhat<br>
&gt; that makes that happen.  likewise, desktop-file-utils should be able<br>
&gt; to drop a file there to make update-desktop-database get run and so<br>
&gt; on.<br>
&gt;<br>
&gt; I don&#39;t know how hard it would be to fix rpm to allow for that though.<br>
<br>
</div>This is definitely possible; Mandriva (I know I talk about MDV a lot,<br>
I&#39;m sorry, it&#39;s what I know! :&gt;) does this, via an implementation called<br>
&#39;file triggers&#39;. This is not yet upstream, though.<br>
</blockquote><div><br></div></div>In @<a href="http://rpm5.org">rpm5.org</a>, yes.<br>