Export rpmtxnBegin() and rpmtxnEnd()

- This allows API users to lock the transaction from other players
  long before entering rpmtsRun(): for example depsolvers first do
  calculations based on the rpmdb, download packages and only then
  start the transaction. We dutifully waited for others to complete
  on the ts lock inside rpmtsRun(), but those others could've
  invalidated all our prior calculations so continuing was potentially
  hazardous even. There are other uses too, we'll get to them
  eventually...
This commit is contained in:
Panu Matilainen 2013-03-11 13:10:38 +02:00
parent 3b9885ea51
commit cd9d401e90
2 changed files with 15 additions and 15 deletions

View File

@ -558,6 +558,21 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
*/
int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset);
/** \ingroup rpmts
* Create a transaction (lock) handle
* @param ts transaction set
* @param flags flags
* @return transaction handle
*/
rpmtxn rpmtxnBegin(rpmts ts, rpmtxnFlags flags);
/** \ingroup rpmts
* Destroy transaction (lock) handle
* @param txn transaction handle
* @return NULL always
*/
rpmtxn rpmtxnEnd(rpmtxn txn);
/** \ingroup rpmte
* Destroy transaction element iterator.
* @param tsi transaction element iterator

View File

@ -116,21 +116,6 @@ rpmRC rpmtsSELabelInit(rpmts ts, int open_status);
*/
void rpmtsSELabelFini(rpmts ts, int close_status);
/** \ingroup rpmts
* Create a transaction (lock) handle
* @param ts transaction set
* @param flags flags
* @return transaction handle
*/
rpmtxn rpmtxnBegin(rpmts ts, rpmtxnFlags flags);
/** \ingroup rpmts
* Destroy transaction (lock) handle
* @param txn transaction handle
* @return NULL always
*/
rpmtxn rpmtxnEnd(rpmtxn txn);
#ifdef __cplusplus
}
#endif