summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-18 17:12:55 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-18 17:12:55 +0200
commit9444f2d7f5bf0ffcd81fac0e04f0e831ac276306 (patch)
tree7b8d4b20cdf677a71908b3b607acdcdf9062a287 /lib
parentf41bd90c2ac156e459e7af368481471b701ed887 (diff)
downloadrpm-9444f2d7f5bf0ffcd81fac0e04f0e831ac276306.tar.gz
rpm-9444f2d7f5bf0ffcd81fac0e04f0e831ac276306.tar.bz2
rpm-9444f2d7f5bf0ffcd81fac0e04f0e831ac276306.zip
Remove useless default flags and action fields from rpmfi
- fi->actions is always allocated so fi->action is never used for anything - fi->flags is just as unused and unnecessary
Diffstat (limited to 'lib')
-rw-r--r--lib/fsm.c9
-rw-r--r--lib/rpmfi.c5
-rw-r--r--lib/rpmfi_internal.h2
3 files changed, 6 insertions, 10 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index c760665ee..2892c07e1 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -14,7 +14,7 @@
#include "lib/cpio.h"
#include "lib/fsm.h"
#define fsmUNSAFE fsmStage
-#include "lib/rpmfi_internal.h" /* XXX fi->apath, fi->action... */
+#include "lib/rpmfi_internal.h" /* XXX fi->apath, ... */
#include "lib/misc.h" /* XXX unameToUid() and gnameToGid() */
#include "debug.h"
@@ -152,7 +152,7 @@ mapInitIterator(rpmts ts, rpmfi fi)
iter = xcalloc(1, sizeof(*iter));
iter->ts = rpmtsLink(ts, RPMDBG_M("mapIterator"));
iter->fi = rpmfiLink(fi, RPMDBG_M("mapIterator"));
- iter->reverse = (rpmteType(fi->te) == TR_REMOVED && fi->action != FA_COPYOUT);
+ iter->reverse = (rpmteType(fi->te) == TR_REMOVED);
iter->i = (iter->reverse ? (fi->fc - 1) : 0);
iter->isave = iter->i;
return iter;
@@ -626,8 +626,9 @@ static int fsmMapPath(FSM_t fsm)
i = fsm->ix;
if (fi && i >= 0 && i < fi->fc) {
- fsm->action = (fi->actions ? fi->actions[i] : fi->action);
- fsm->fflags = (fi->fflags ? fi->fflags[i] : fi->flags);
+ /* XXX these should use rpmfiFFlags() etc */
+ fsm->action = (fi->actions ? fi->actions[i] : FA_UNKNOWN);
+ fsm->fflags = (fi->fflags ? fi->fflags[i] : RPMFILE_NONE);
/* src rpms have simple base name in payload. */
fsm->dirName = fi->dnl[fi->dil[i]];
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 97ababed1..89f3c5064 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -388,7 +388,7 @@ rpmFileAction rpmfiFAction(rpmfi fi)
if (fi != NULL && fi->actions != NULL && fi->i >= 0 && fi->i < fi->fc) {
action = fi->actions[fi->i];
} else {
- action = fi ? fi->action : FA_UNKNOWN;
+ action = FA_UNKNOWN;
}
return action;
}
@@ -1290,9 +1290,6 @@ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, rpmfiFlags flags)
_hgfi(h, RPMTAG_FILECAPS, &td, defFlags, fi->fcaps);
- fi->action = FA_UNKNOWN;
- fi->flags = 0;
-
/* For build and src.rpm's the file actions are known at this point */
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
if (isBuild) {
diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h
index 3eb7b524b..f76e68073 100644
--- a/lib/rpmfi_internal.h
+++ b/lib/rpmfi_internal.h
@@ -81,8 +81,6 @@ struct rpmfi_s {
rpmfiFlags fiflags; /*!< file info set control flags */
headerGetFlags scareFlags; /*!< headerGet flags wrt scareMem */
/*-----------------------------*/
- rpmfileAttrs flags; /*!< File flags (default). */
- rpmFileAction action; /*!< File disposition (default). */
rpmFileAction * actions; /*!< File disposition(s). */
struct fingerPrint_s * fps; /*!< File fingerprint(s). */