Hi 28.03.2018 15:21, Jeff Johnson пишет:
Adding AUTOINSTALLED through a transaction like this is far more complex than necessary, particularly since rpm itself does not need nor use that tag for any purpose whatsoever. There are already existing rpm interfaces to retrieve a header, add a tag, and re-register the header. What is the justification for doing this operation within an rpm transaction? 73 de Jeff _______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
When I was considering possible ways of implementing this feature I found only rpmtsAddInstallElement, rpmtsAddReinstallElement and rpmtsRebuildDB, and none of those functions worked for this purpose quite well. So I had to implement it the way it was required.
I've looked at librpm API documentation a few moments ago and found rpmdbSetIteratorRewrite + rpmdbSetIteratorModified. Did you mean these interfaces or something else I missed which could be used for changing headers in rpm db?
As for doing it within transaction, why not? As far as I can see almost every action on RPM db is done on open transaction, including rpmtsRebuildDB and rpmdbSetIteratorRewrite + rpmdbSetIteratorModified. Atomicity and consistency of transaction wouldn't hurt either.
Best regards Aleksei Nikiforov _______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint