summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/files.c2
-rw-r--r--lib/psm.c3
-rw-r--r--lib/query.c3
-rw-r--r--lib/rpmte.c2
-rw-r--r--lib/tagexts.c8
-rw-r--r--lib/transaction.c7
-rw-r--r--lib/verify.c4
7 files changed, 12 insertions, 17 deletions
diff --git a/build/files.c b/build/files.c
index 433bc151e..7fb7e0478 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1249,7 +1249,7 @@ static void genCpioListAndHeader(FileList fl,
{
rpmts ts = NULL; /* XXX FIXME drill rpmts ts all the way down here */
- rpmfi fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, 0);
+ rpmfi fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
char * a, * d;
fi->te = xcalloc(1, sizeof(*fi->te));
diff --git a/lib/psm.c b/lib/psm.c
index 5e3724c8d..a98dc516d 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -229,7 +229,6 @@ static rpmRC markReplacedFiles(const rpmpsm psm)
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
char ** specFilePtr, char ** cookie)
{
- int scareMem = 1;
rpmfi fi = NULL;
char * specFile = NULL;
Header h = NULL;
@@ -270,7 +269,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
goto exit;
}
- fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);
h = headerFree(h);
if (fi == NULL) { /* XXX can't happen */
diff --git a/lib/query.c b/lib/query.c
index 519fbdd4a..366355acb 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -102,7 +102,6 @@ static void printFileInfo(const char * name,
int showQueryPackage(QVA_t qva, rpmts ts, Header h)
{
- int scareMem = 0;
rpmfi fi = NULL;
int rc = 0; /* XXX FIXME: need real return code */
int i;
@@ -122,7 +121,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
if (!(qva->qva_flags & QUERY_FOR_LIST))
goto exit;
- fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
if (rpmfiFC(fi) <= 0) {
rpmlog(RPMLOG_NOTICE, _("(contains no files)\n"));
goto exit;
diff --git a/lib/rpmte.c b/lib/rpmte.c
index fb4aefd44..776b923a8 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -143,7 +143,7 @@ static void addTE(rpmts ts, rpmte p, Header h,
p->obsoletes = rpmdsNew(h, RPMTAG_OBSOLETENAME, scareMem);
savep = rpmtsSetRelocateElement(ts, p);
- p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
(void) rpmtsSetRelocateElement(ts, savep);
rpmteColorDS(p, RPMTAG_PROVIDENAME);
diff --git a/lib/tagexts.c b/lib/tagexts.c
index 88ebf1991..44d8dfcf7 100644
--- a/lib/tagexts.c
+++ b/lib/tagexts.c
@@ -99,8 +99,7 @@ static void rpmfiBuildFNames(Header h, rpmTag tagN,
static int filedepTag(Header h, rpmTag tagN, rpmtd td)
{
- int scareMem = 0;
- rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
+ rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
rpmds ds = NULL;
char **fdeps = NULL;
int numfiles;
@@ -117,7 +116,7 @@ static int filedepTag(Header h, rpmTag tagN, rpmtd td)
else if (tagN == RPMTAG_REQUIRENAME)
deptype = 'R';
- ds = rpmdsNew(h, tagN, scareMem);
+ ds = rpmdsNew(h, tagN, 0);
fdeps = xmalloc(numfiles * sizeof(*fdeps));
while ((fileix = rpmfiNext(fi)) >= 0) {
@@ -404,8 +403,7 @@ static int origfilenamesTag(Header h, rpmtd td)
*/
static int fileclassTag(Header h, rpmtd td)
{
- int scareMem = 0;
- rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
+ rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
char **fclasses;
int ix, numfiles;
diff --git a/lib/transaction.c b/lib/transaction.c
index 46b949d5f..6da24e999 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -83,13 +83,12 @@ static int handleInstInstalledFiles(const rpmts ts,
{ rpmdbMatchIterator mi;
Header h;
- int scareMem = 0;
mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES,
&shared->otherPkg, sizeof(shared->otherPkg));
while ((h = rpmdbNextIterator(mi)) != NULL) {
altNEVR = headerGetNEVRA(h, NULL);
- otherFi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ otherFi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
break;
}
mi = rpmdbFreeIterator(mi);
@@ -804,7 +803,7 @@ static int runTransScripts(rpmts ts, rpmTag stag)
if (rpmteFd(p) != NULL) {
p->fi = rpmfiFree(p->fi);
- fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
+ fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);
if (fi != NULL) { /* XXX can't happen */
if (stag == RPMTAG_PRETRANS) {
fi->te = p;
@@ -1394,7 +1393,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
fi = rpmfiFree(fi);
savep = rpmtsSetRelocateElement(ts, p);
- fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
+ fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);
(void) rpmtsSetRelocateElement(ts, savep);
if (fi != NULL) { /* XXX can't happen */
diff --git a/lib/verify.c b/lib/verify.c
index 69fcd162a..d620f7db5 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -406,12 +406,12 @@ static int verifyDependencies(QVA_t qva, rpmts ts,
int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
{
- int scareMem = 1; /* XXX only rpmVerifyScript needs now */
rpmfi fi;
int ec = 0;
int rc;
- fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ /* XXX only rpmVerifyScript needs KEEPHEADER */
+ fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_KEEPHEADER);
if (fi != NULL) {
if (qva->qva_flags & VERIFY_DEPS) {