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

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



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

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


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