On Wed, Aug 27, 2008 at 09:13:18AM -0400, Jeff Johnson wrote:
> There's the Mandriva solution, called "file triggers", to the cache
> problem in lib/filetriggers.c. I dislike several things with the the
> Mandriva implementation, but the idea is closest to being generally
> useful IMHO.
1880 if ((rpmtsFlags(ts) & _noTransTriggers) != _noTransTriggers)
Perhaps I need more general *mechanism* which can implement file
triggers as a site/vendor *policy*, and which is not limited itself
to file triggers.
In rpmRunSitePosttrans, what possibly can be done is provide
the ability for lua script to access installed and removed headers.
That is, rpmRunSitePosttrans can call lua script
/usr/lib/rpm/posttrans.lua with basically two arguments:
the list of removed package instance numbers, and the list
of added instance numbers (in the transaction ts).
Also, it is necessary to provide lua bindings for 1) retrieving
headers by instance, perhepas something like "h = getAddedHeader(num)"
and "h = getRemovedHeader(num)"; and 2) retrieving header entries,
Then the whole notion of "posttrans file triggers" or whatever posttrans
triggers can be implemented that posttrans.lua script.
Now, it is easy to retrive headers of added packages, but it is a tricky
question if I can access headers of removed packages, i.e. the headers
that's been removed from rpmdb while the transaction ts is not finished
yet. There seems to be RPMDBI_REMOVED temporary database, but I am not
sure how it is supposed to work.
Received on Thu Sep 4 22:53:13 2008
- application/pgp-signature attachment: stored