From 4bf615989c2c7519abab043f4a152f594d8b7a69 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 7 Jan 2009 15:54:06 +0200 Subject: [PATCH] rpmRelocateFileList() doesn't need rpmte for anything, just file states --- lib/rpmfi.c | 13 +++---------- lib/rpmte.c | 2 +- lib/rpmte_internal.h | 12 ++++++++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/rpmfi.c b/lib/rpmfi.c index f30e4e7..10ef83b 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -825,15 +825,8 @@ static void saveRelocs(Header h, rpmtd bnames, rpmtd dnames, rpmtd dindexes) headerMod(h, dindexes); } -/** - * Relocate files in header. - * @todo multilib file dispositions need to be checked. - * @param p transaction element - * @param relocs relocations - * @param h package header to relocate - */ -void rpmRelocateFileList(rpmte p, - rpmRelocation *relocations, int numRelocations, Header h) +void rpmRelocateFileList(rpmRelocation *relocations, int numRelocations, + rpmfs fs, Header h) { static int _printed = 0; char ** baseNames; @@ -953,7 +946,7 @@ assert(fn != NULL); /* XXX can't happen */ break; } } - rpmfsSetAction(rpmteGetFileStates(p), i, FA_SKIPNSTATE); + rpmfsSetAction(fs, i, FA_SKIPNSTATE); rpmlog(RPMLOG_DEBUG, "excluding %s %s\n", ftstring(ft), fn); continue; diff --git a/lib/rpmte.c b/lib/rpmte.c index 8a88020..7a2bb40 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -128,7 +128,7 @@ static rpmfi getFI(rpmte p, rpmts ts, Header h) /* relocate stuff in header if necessary */ if (rpmteType(p) == TR_ADDED) { if (!headerIsSource(h) && !headerIsEntry(h, RPMTAG_ORIGBASENAMES)) { - rpmRelocateFileList(p, p->relocs, p->nrelocs, h); + rpmRelocateFileList(p->relocs, p->nrelocs, p->fs, h); } } return rpmfiNew(ts, h, RPMTAG_BASENAMES, fiflags); diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h index abe0ea9..281f65f 100644 --- a/lib/rpmte_internal.h +++ b/lib/rpmte_internal.h @@ -114,9 +114,17 @@ rpmFileAction rpmfsGetAction(rpmfs fs, unsigned int ix); //RPM_GNUC_INTERNAL void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action); -RPM_GNUC_INTERNAL /* XXX here for now... */ -void rpmRelocateFileList(rpmte p, rpmRelocation *relocs, int numRelocations, Header h); +/** + * Relocate files in header. + * @todo multilib file dispositions need to be checked. + * @param relocations relocations + * @param numRelocations number of relocations + * @param fs file state set + * @param h package header to relocate + */ +RPM_GNUC_INTERNAL +void rpmRelocateFileList(rpmRelocation *relocs, int numRelocations, rpmfs fs, Header h); #endif /* _RPMTE_INTERNAL_H */ -- 2.7.4