Stanislav Brabec <[EMAIL PROTECTED]> writes:

[...]

> Using %preun is acceptable only for uninstallation, not for upgrade.
> But this is yet another problem mentioned in the document, not related
> to one-time-scriptlets.

oops, right. mandriva never went that far :)

[...]

> However I can imagine an one-time unsubscription counterpart (something,
> which will evaluate list of all files going to be removed or overwritten
> in the forthcoming transaction and then issue a command with a such
> list. I think it could be possible to write it as well, but only deep
> inside the rpm (when rpm evaluates possible conflicts in forthcoming
> transaction).

it should not be very hard to have pretrans filetriggers, but it would
be dangerous if the transaction somehow fails.

eg: the gconf schema gets uninstalled in %prettrans, but a rollback
re-adding it would be necessary on failure. And even if rollback was
handled nicely, it would imply some unnecessary uninstall of schema
(since the install will handle existing schema).

A solution could be: files needing subscription/unsubscription could
be renamed to .rpmprevious instead of being removed ; then used in
filetrigger, and only removed what all this is done. 
Still, the filetrigger script would need to be able to check the
difference between previous and new file, to know what to do, which
may not be easy...
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to