So, I'm oscillatting a bit.

Basically, you've got a package A that defines a tag, e.g., in the PLIST:

@define-tag f at-end %D/bin/f
f

normally, this gets %D/bin/f to run at the end of the installation.

What happens if you delete A ?
The current idea was to have
@tag f
also in A, before removing f, like so:

@define-tag f at-end %D/bin/f
@tag 
f


in which case f will be run before zapping it :)


There are cases when this is actually somewhat inefficient. e.g., assumes
f produces some kind of f.cache file. When removing, just doing

@unexec-delete rm -f %D/share/f.cache

would be enough.

With the current semantics, we have two choices:
1/ don't put any tag in A's plist... so at-end we try to run f, which is gone,
and fail...
2/ put a tag in A's plist, run f one last time, which is probably not that
useful, since we are going to remove the file anyway.

I think that  1/   should just not try to run f at all (e.g., recognize
the @define-tag  got removed, and just don't do anything about it, since
the cache file will be removed).


To avoid "unhandled" cases, the
@unexec-delete rm -f %D/share/f.cache

should probably be some @define-tag addition, e.g.,
@define-tag f cleanup %D/share/f.cache

so that we know we're still cleaning up.


Am I making sense ? shouldn't be too hard to implement actually...

Reply via email to