On Mon, Aug 13, 2012 at 12:03:59PM +0400, Vadim Zhukov wrote: > 2012/8/13 Antoine Jacoutot <[email protected]>: > > On Sun, Aug 12, 2012 at 10:06:15PM +0400, Vadim Zhukov wrote: > >> Hello all. > >> > >> Here is a working prototype of cache invalidating helper framework. > >> With it you can just add something like: > >> > >> MODULES += updb > >> MODUPDB_WHAT = desktop-files icons > >> > >> and have all RUN_DEPENDS and @exec/@unexec-goo added to final plist > >> on the fly. Module is MULTI_PACKAGES aware but require small patch > >> to bsd.port.mk (see below). PKG_ARGS_TAIL is the same as PKG_ARGS > >> but is appended at the last; this way we get packaging list fragments > >> where they belong, at the end of the plist. > >> > >> In the future I think it's possible to add automatic checks in plist > >> create/update stage, making make-plist warn when something is missed. > >> > >> Comments and flames are welcome. :) > > > > We decided some time ago to go with triggers which espie@ is working on. > > It'll eventually work similar to @fontdir (similar as in a marker, not > > similar in the code) so it was decided not to go the way you are proposing. > > It's nice to hear the work is already going in that land. :) Thanks > for the answer.
If you look very closely in pkg_add, you'll see some partial framework that deals with @tag and @define-tag. Rough todo list concerning that: - I need to be more precise wrt updates, as antoine found out. Being in "replace" mode is not enough to switch to exec-update/unexec-update. I have to actually say that I'm dealing with a packing-list that's an active part of an update. - the tag/define-tag goo is only handled during addition. Similar code must be done for deletion (it should be easier, since the addition is the part that scans for define-tags and can add the corresponding dependency to +REQUIRED/+REQUIRING). - then modes have to be defined for define-tag, with preferably simple syntax. update-desktop-database is very simple, since basically it needs to be run once. But the @tag are actually linked to plist entries, so we can accumulate directories/files, remove duplicates, run commands on addition/deletion, and so on... I haven't really looked at that part yet. - I was wondering about what's going to happen if we remove the package that has the define-tag... I think that, in that case, too bad for the tags, the package is gone. *but* I can insert @unexec directly in THAT specific package to cater to that case. Again, taking the update-desktop-database, when removing that package, you probably want to run it right before you remove update-desktop-database binary... Well, that's all part of all the stuff slated for "after 5.2" in general... slowly making progress on various thingies...
