diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psm.c | 14 | ||||
-rw-r--r-- | lib/psm.h | 3 | ||||
-rw-r--r-- | lib/transaction.c | 5 | ||||
-rw-r--r-- | lib/verify.c | 2 |
4 files changed, 13 insertions, 11 deletions
@@ -317,6 +317,8 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, goto exit; } fi->apath = filenames.data; /* Ick */ + rpmteSetFI(te, fi); + fi = rpmfiFree(fi); if (rpmMkdirs(rpmtsRootDir(ts), "%{_topdir}:%{_sourcedir}:%{_specdir}")) { goto exit; @@ -330,7 +332,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, for (i=0; i<fc; i++) rpmfsSetAction(fs, i, FA_CREATE); } - psm = rpmpsmNew(ts, te, fi); + psm = rpmpsmNew(ts, te); psm->goal = PSM_PKGINSTALL; /* FIX: psm->fi->dnl should be owned. */ @@ -1121,17 +1123,19 @@ rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag) return rpmpsmStage(psm, PSM_SCRIPT); } -rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi) +rpmpsm rpmpsmNew(rpmts ts, rpmte te) { rpmpsm psm = xcalloc(1, sizeof(*psm)); if (ts) psm->ts = rpmtsLink(ts, RPMDBG_M("rpmpsmNew")); + if (te) { #ifdef NOTYET - if (te) psm->te = rpmteLink(te, RPMDBG_M("rpmpsmNew")); + psm->te = rpmteLink(te, RPMDBG_M("rpmpsmNew")); #else - if (te) psm->te = te; + psm->te = te; #endif - if (fi) psm->fi = rpmfiLink(fi, RPMDBG_M("rpmpsmNew")); + psm->fi = rpmfiLink(rpmteFI(te), RPMDBG_M("rpmpsmNew")); + } return rpmpsmLink(psm, RPMDBG_M("rpmpsmNew")); } @@ -93,11 +93,10 @@ rpmpsm rpmpsmFree(rpmpsm psm); * Create and load a package state machine. * @param ts transaction set * @param te transaction set element - * @param fi file info set * @return new package state machine */ RPM_GNUC_INTERNAL -rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi); +rpmpsm rpmpsmNew(rpmts ts, rpmte te); /** * Package state machine driver. diff --git a/lib/transaction.c b/lib/transaction.c index b39caade3..e5a524982 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -828,7 +828,7 @@ static int runTransScripts(rpmts ts, rpmTag stag) } if (rpmteOpen(p, ts, 0)) { - psm = rpmpsmNew(ts, p, NULL); + psm = rpmpsmNew(ts, p); xx = rpmpsmScriptStage(psm, stag, progtag); psm = rpmpsmFree(psm); rpmteClose(p, ts); @@ -865,7 +865,6 @@ static int rpmtsProcess(rpmts ts) if (rpmteOpen(p, ts, 1)) { rpmpsm psm = NULL; - rpmfi fi = rpmteFI(p); pkgStage stage = PSM_UNKNOWN; int async = (rpmtsiOc(pi) >= rpmtsUnorderedSuccessors(ts, -1)) ? 1 : 0; @@ -878,7 +877,7 @@ static int rpmtsProcess(rpmts ts) stage = PSM_PKGERASE; break; } - psm = rpmpsmNew(ts, p, fi); + psm = rpmpsmNew(ts, p); rpmpsmSetAsync(psm, async); (void) rpmswEnter(rpmtsOp(ts, op), 0); diff --git a/lib/verify.c b/lib/verify.c index e96bfaa36..1fb0195d8 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -278,7 +278,7 @@ static int rpmVerifyScript(QVA_t qva, rpmts ts, Header h, FD_t scriptFd) rpmtsSetScriptFd(ts, scriptFd); /* create psm to run the script */ - psm = rpmpsmNew(ts, te, NULL); + psm = rpmpsmNew(ts, te); rpmpsmScriptStage(psm, RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG); rc = rpmpsmStage(psm, PSM_SCRIPT); psm = rpmpsmFree(psm); |