summaryrefslogtreecommitdiff
path: root/lib/rpmfi.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-01-11 15:11:37 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-01-11 15:41:22 +0200
commitaee64fbc460a671faa3f950d329ec72f33ac660c (patch)
treed11d2baa2cd84b8820aa5d87fd3a8d17729bf32b /lib/rpmfi.c
parent1dc09307d85fc68bac450d5fa54db79450a3920c (diff)
downloadlibrpm-tizen-aee64fbc460a671faa3f950d329ec72f33ac660c.tar.gz
librpm-tizen-aee64fbc460a671faa3f950d329ec72f33ac660c.tar.bz2
librpm-tizen-aee64fbc460a671faa3f950d329ec72f33ac660c.zip
Turn FSM into a blackbox, much like PSM is
- Similar in spirit to PSM blackbox treatment in commit df9cdb1321ada8e3b120771f91a2eefab4ac2ad5, except that technically fsm guts are still wide-open in fsm.h due to cpio "needing" them (yuck). - Allows getting rid of dumb a**-backwards things like rpmfiFSM() which is just not needed, fsm is a relatively short-lived entity inside psm and build, nobody else needs to bother with it except for the returned results. - Figure out the cpio map flags in fsmSetup() where it logically belongs, we have all the necessary info available there. - Get rid of newFSM() and freeFSM(), we can just as well place the fsm on stack, merge the necessary cleanup bits from freeFSM() into fsmTeardown() - Supposedly no functional changes, knock wood.
Diffstat (limited to 'lib/rpmfi.c')
-rw-r--r--lib/rpmfi.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 641c924b8..1995541d5 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -15,7 +15,6 @@
#include "lib/rpmfi_internal.h"
#include "lib/rpmte_internal.h" /* relocations */
#include "lib/cpio.h" /* XXX CPIO_FOO */
-#include "lib/fsm.h" /* XXX newFSM() */
#include "debug.h"
@@ -1085,8 +1084,6 @@ rpmfi rpmfiFree(rpmfi fi)
}
}
- fi->fsm = freeFSM(fi->fsm);
-
fi->fn = _free(fi->fn);
fi->apath = _free(fi->apath);
@@ -1279,28 +1276,6 @@ void rpmfiFpLookup(rpmfi fi, fingerPrintCache fpc)
fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fi->fc, fi->fps);
}
-FSM_t rpmfiFSM(rpmfi fi)
-{
- if (fi != NULL && fi->fsm == NULL) {
- cpioMapFlags mapflags;
- /* Figure out mapflags:
- * - path, mode, uid and gid are used by everything
- * - all binary packages get SBIT_CHECK set
- * - if archive size is not known, we're only building this package,
- * different rules apply
- */
- mapflags = CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID;
- if (fi->fiflags & RPMFI_ISBUILD) {
- mapflags |= CPIO_MAP_TYPE;
- if (fi->fiflags & RPMFI_ISSOURCE) mapflags |= CPIO_FOLLOW_SYMLINKS;
- } else {
- if (!(fi->fiflags & RPMFI_ISSOURCE)) mapflags |= CPIO_SBIT_CHECK;
- }
- fi->fsm = newFSM(mapflags);
- }
- return (fi != NULL) ? fi->fsm : NULL;
-}
-
/*
* Generate iterator accessors function wrappers, these do nothing but
* call the corresponding rpmfiFooIndex(fi, fi->[ij])