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

Nicolas Mailhot nicolas.mailhot at laposte.net
Mon Jun 8 11:25:55 UTC 2009


Le samedi 06 juin 2009 à 13:01 +0300, Panu Matilainen a écrit :

> Yes, having each and every spec carry the %{!?foo:¤%&¤%} macro goo makes 
> no sense at all.

That is pretty much what we did for fonts in F11. However many packagers
just ignored the change and didn't fix their packages.

> >>> 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.
> 
> The hardest part is getting the design right the first time, there's no 
> changing an "api" that is exposed to packages.

I personally think it would be a huge mistake to have stuff happen
automatically based on filename/location heuristics. Naming collisions
happen all the time (for example GNOME recently decided that a third of
our fonts were "ODF templates" and good luck trying to find someone
ready to acknowledge it's a problem). I'd much prefer if the packager
was left in control and specified the processing himself, for example by
allowing more magic %doc-like words in %files.

In my ideal pony-land, we could have stuff like

%files somepackage

%font somefont.ttf
%icon-dir somedirectory
...

that injected the correct logic in %install/%pre/%post/%postun/%
posttrans etc

And I suppose some of those magic words would work on files already
installed, others on files in the build root (like %doc), and you'd need
them to interact (for example, consolidate three %font lines in a
package in a single actions, have the %font word be aware of the %
fontconfig word so one could correct font file processing with explicit
fontconfig rules, etc)

-- 
Nicolas Mailhot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20090608/9a7175eb/attachment.sig>


More information about the fedora-devel-list mailing list