summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-02-02 15:04:44 +0000
committerjbj <devnull@localhost>2001-02-02 15:04:44 +0000
commite3d524717407f943594d41429988b61561e36549 (patch)
treeed5dd17ab5f76ea5a274c623b6aa588e509c89f5 /build
parent1363a3339deb73cbbfe38b432a1af51640c0cb6e (diff)
downloadlibrpm-tizen-e3d524717407f943594d41429988b61561e36549.tar.gz
librpm-tizen-e3d524717407f943594d41429988b61561e36549.tar.bz2
librpm-tizen-e3d524717407f943594d41429988b61561e36549.zip
Use fsm for building.
CVS patchset: 4514 CVS date: 2001/02/02 15:04:44
Diffstat (limited to 'build')
-rw-r--r--build/pack.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/pack.c b/build/pack.c
index c7c7efbf1..5de5302a1 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -41,6 +41,7 @@ static int cpio_doio(FD_t fdo, Header h, CSA_t * csa, const char * fmodeMacro)
const char * rootDir = "/";
rpmdb rpmdb = NULL;
rpmTransactionSet ts = rpmtransCreateSet(rpmdb, rootDir);
+ TFI_t fi = csa->cpioList;
const char *fmode = rpmExpand(fmodeMacro, NULL);
const char *failedFile = NULL;
FD_t cfd;
@@ -50,15 +51,19 @@ static int cpio_doio(FD_t fdo, Header h, CSA_t * csa, const char * fmodeMacro)
fmode = xstrdup("w9.gzdio");
(void) Fflush(fdo);
cfd = Fdopen(fdDup(Fileno(fdo)), fmode);
- rc = cpioBuildArchive(ts, csa->cpioList, cfd,
- &csa->cpioArchiveSize, &failedFile);
+
+ rc = fsmSetup(fi->fsm, ts, fi, cfd, &csa->cpioArchiveSize, &failedFile);
+ rc = cpioBuildArchive(fi->fsm);
+
+ Fclose(cfd);
+ (void) fsmTeardown(fi->fsm);
+
if (rc) {
rpmError(RPMERR_CPIO, _("create archive failed on file %s: %s\n"),
failedFile, cpioStrerror(rc));
rc = 1;
}
- Fclose(cfd);
if (failedFile)
free((void *)failedFile);
free((void *)fmode);