summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-26 16:08:04 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-27 09:25:12 +0200
commit610347de6e07e7cd4ff13cfa9467280ed5e8c175 (patch)
tree8ac65d356c15cf1ffcd7000d8b1da5a683cf11e3 /build
parent54b683d2f395998178b760257f1145c246f9e09f (diff)
downloadrpm-610347de6e07e7cd4ff13cfa9467280ed5e8c175.tar.gz
rpm-610347de6e07e7cd4ff13cfa9467280ed5e8c175.tar.bz2
rpm-610347de6e07e7cd4ff13cfa9467280ed5e8c175.zip
Pass rpmte to fsmSetup()
- fsm needs the transaction element for progress notification and element type anyway
Diffstat (limited to 'build')
-rw-r--r--build/pack.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/build/pack.c b/build/pack.c
index 29e1d0524..71ff1b15a 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -29,6 +29,7 @@ static rpmRC cpio_doio(FD_t fdo, Header h, CSA_t csa,
{
rpmts ts = rpmtsCreate();
rpmfi fi = csa->cpioList;
+ rpmte te = NULL;
char *failedFile = NULL;
FD_t cfd;
rpmRC rc = RPMRC_OK;
@@ -44,7 +45,11 @@ static rpmRC cpio_doio(FD_t fdo, Header h, CSA_t csa,
if (cfd == NULL)
return RPMRC_FAIL;
- xx = fsmSetup(rpmfiFSM(fi), FSM_PKGBUILD, ts, fi, cfd,
+ /* make up a transaction element for passing to fsm */
+ rpmtsAddInstallElement(ts, h, NULL, 0, NULL);
+ te = rpmtsElement(ts, 0);
+
+ xx = fsmSetup(rpmfiFSM(fi), FSM_PKGBUILD, ts, te, fi, cfd,
&csa->cpioArchiveSize, &failedFile);
if (xx)
rc = RPMRC_FAIL;
@@ -61,6 +66,7 @@ static rpmRC cpio_doio(FD_t fdo, Header h, CSA_t csa,
cpioStrerror(rc));
rc = RPMRC_FAIL;
}
+ rpmtsEmpty(ts);
failedFile = _free(failedFile);
ts = rpmtsFree(ts);