summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/psm.c b/lib/psm.c
index de42c53b4..7dd2a0156 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -687,7 +687,7 @@ static rpmpsm rpmpsmNew(rpmts ts, rpmte te)
return psm;
}
-static int rpmpsmNext(rpmpsm psm, pkgStage nstage)
+static rpmRC rpmpsmNext(rpmpsm psm, pkgStage nstage)
{
psm->nstage = nstage;
return rpmpsmStage(psm, psm->nstage);
@@ -1035,7 +1035,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
}
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
- rc = rpmdbAdd(rpmtsGetRdb(ts), h);
+ rc = (rpmdbAdd(rpmtsGetRdb(ts), h) == 0) ? RPMRC_OK : RPMRC_FAIL;
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
if (rc == RPMRC_OK)
@@ -1045,7 +1045,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
case PSM_RPMDB_REMOVE:
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
- rc = rpmdbRemove(rpmtsGetRdb(ts), rpmteDBInstance(psm->te));
+ rc = (rpmdbRemove(rpmtsGetRdb(ts), rpmteDBInstance(psm->te)) == 0) ?
+ RPMRC_OK : RPMRC_FAIL;
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
if (rc == RPMRC_OK)
rpmteSetDBInstance(psm->te, 0);