projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31f0e1d
)
Set/clear rpmte db instance on RPMDB_ADD / REMOVE from psm
author
Panu Matilainen
<pmatilai@redhat.com>
Sun, 30 Nov 2008 15:36:46 +0000
(17:36 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Sun, 30 Nov 2008 15:36:46 +0000
(17:36 +0200)
- transaction elements now know their real status all the time now
lib/psm.c
patch
|
blob
|
history
diff --git
a/lib/psm.c
b/lib/psm.c
index
6164b66
..
c34304a
100644
(file)
--- a/
lib/psm.c
+++ b/
lib/psm.c
@@
-1615,8
+1615,10
@@
rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
else
rc = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), h,
NULL, NULL);
-
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
+
+ if (rc == RPMRC_OK)
+ rpmteSetDBInstance(psm->te, headerGetInstance(h));
headerFree(h);
} break;
@@
-1626,6
+1628,8
@@
rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
rc = rpmdbRemove(rpmtsGetRdb(ts), rpmtsGetTid(ts),
rpmteDBInstance(psm->te), NULL, NULL);
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
+ if (rc == RPMRC_OK)
+ rpmteSetDBInstance(psm->te, 0);
break;
default: