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

Re: Triggers on file patterns (similar to bug #553266)



Op 7 aug 2011, om 20:49 heeft Raphael Hertzog het volgende geschreven:

> I think that it's encouraging people to abuse triggers. In essence a
> trigger is useful to configure something for the package that activates
> the file trigger or at least something for the package that is
> activated.
> 
> I don't see what you would "configure" by matching *.la files. So for now
> I think it's a bad idea and you would have to come up with a good use case
> and a good rationale before I accept such a patch.

Hi Raphael,

(disclaimer: I've been doing work for the Fink project, but in no way represent the project as a whole, just myself and my own personal opinions.)

The reason I'm asking is because of the Fink package manager for Mac OS X, which uses dpkg and apt extensively. We're in the process of upgrading from the ancient dpkg 1.10 to 1.15. One of the advantages of this version is that we are now blessed with triggers, which can help with some of the things we had implemented in Fink itself, earlier. For example, the TeXinfo system from Debian is a much handier, better approach than the "old way": every package maintainer had to specify what infodocs a package had, only calling install-info on these. And if the directory was corrupted because some external software installation had touched it, you're stuck with a broken directory, and on dpkg 1.15 it would even cause fatal package installation errors because of dpkg -> GNU install-info, leading to a broken package state. So I'm very happy the trigger system, combined with the install-info / update-info-dir system from Debian, helps us to fix those issues properly now.

But there's one piece missing: Mac OS X has its own solution for the linking of libraries, which conflicts with libtool's "dependency_libs" in all .la files (I don't completely know the internals). This has always been solved by modifying all .la files that packages install and clearing the dependency_libs statement before actually installing the .la files. We can't simply patch libtool either, because it's installed on the system, not by Fink itself.

The code for this is in Fink, and iirc it works something like this: for every package that's going to be installed, check every file it installs, and for every ".la" file, modify the file a bit. Thinking about how triggers work, it seems silly to have this in Fink itself: it matches everything 'filesystem-aware' triggers are supposed to do:

* triggered when there are filesystem changes matching a rule,
* runs a script that will 'configure' the installed package.

So if we could add a trigger on every file matching the "*.la" glob (or the /\.la$/ regex, if you prefer that method), it sounds like a good feature for dpkg with valid use-cases, and it would allow us to remove this 'duplicate' code in Fink. An alternative would be to have a "dpkg-trigger" in every package installing .la files, but that kind of defeats the purpose.

What do you think about the feature with this background? :)

Thanks,
Sjors

Attachment: PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


Reply to: