summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-27 10:02:00 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-27 10:02:00 +0200
commit48cefd2d785d3ba70eb5636789d63dd14c229e7f (patch)
tree0f8dcca4b6548bab3ed43414af78ab8f057864e0
parent01739ef5d6a56cea818f88a693a21359e3badca3 (diff)
downloadrpm-48cefd2d785d3ba70eb5636789d63dd14c229e7f.tar.gz
rpm-48cefd2d785d3ba70eb5636789d63dd14c229e7f.tar.bz2
rpm-48cefd2d785d3ba70eb5636789d63dd14c229e7f.zip
Drop the useless "tag" argument from rpmteFI()
- only RPMTAG_BASENAMES was ever allowed as the tag, makes no sense - API change but AFAIK nothing outside rpm itself uses it anyway
-rw-r--r--lib/depends.c4
-rw-r--r--lib/fprint.c4
-rw-r--r--lib/rpmte.c9
-rw-r--r--lib/rpmte.h3
-rw-r--r--lib/rpmts.c2
-rw-r--r--lib/transaction.c4
-rw-r--r--python/rpmte-py.c19
7 files changed, 12 insertions, 33 deletions
diff --git a/lib/depends.c b/lib/depends.c
index d33a3a42b..a06db56c9 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -250,7 +250,7 @@ addheader:
pkgKey = rpmalAdd(&ts->addedPackages, pkgKey, rpmteKey(p),
rpmteDS(p, RPMTAG_PROVIDENAME),
- rpmteFI(p, RPMTAG_BASENAMES), tscolor);
+ rpmteFI(p), tscolor);
if (pkgKey == RPMAL_NOMATCH) {
ts->order[oc] = rpmteFree(ts->order[oc]);
ec = 1;
@@ -1571,7 +1571,7 @@ int rpmtsCheck(rpmts ts)
goto exit;
rc = 0;
- fi = rpmteFI(p, RPMTAG_BASENAMES);
+ fi = rpmteFI(p);
fi = rpmfiInit(fi, 0);
while (rpmfiNext(fi) >= 0) {
const char * fn = rpmfiFN(fi);
diff --git a/lib/fprint.c b/lib/fprint.c
index cb14fb898..060bd9188 100644
--- a/lib/fprint.c
+++ b/lib/fprint.c
@@ -238,7 +238,7 @@ void fpLookupList(fingerPrintCache cache, const char ** dirNames,
void fpLookupSubdir(rpmFpHash ht, rpmFpHash newht, fingerPrintCache fpc, rpmte p, int filenr)
{
- rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES);
+ rpmfi fi = rpmteFI(p);
struct fingerPrint_s current_fp;
char *endsubdir, *endbasename, *currentsubdir;
size_t lensubDir;
@@ -280,7 +280,7 @@ void fpLookupSubdir(rpmFpHash ht, rpmFpHash newht, fingerPrintCache fpc, rpmte p
char const *linktarget;
char *link;
- foundfi = rpmteFI(recs[i].p, RPMTAG_BASENAMES);
+ foundfi = rpmteFI(recs[i].p);
fiFX = rpmfiFX(foundfi);
filenr = recs[i].fileno;
diff --git a/lib/rpmte.c b/lib/rpmte.c
index 50ac61626..53ac5f8c7 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -477,20 +477,17 @@ rpmds rpmteDS(rpmte te, rpmTag tag)
return NULL;
}
-rpmfi rpmteFI(rpmte te, rpmTag tag)
+rpmfi rpmteFI(rpmte te)
{
if (te == NULL)
return NULL;
- if (tag == RPMTAG_BASENAMES)
- return te->fi;
- else
- return NULL;
+ return te->fi; /* XXX take fi reference here? */
}
void rpmteColorDS(rpmte te, rpmTag tag)
{
- rpmfi fi = rpmteFI(te, RPMTAG_BASENAMES);
+ rpmfi fi = rpmteFI(te);
rpmds ds = rpmteDS(te, tag);
char deptype = 'R';
char mydt;
diff --git a/lib/rpmte.h b/lib/rpmte.h
index 32ece3b16..a5e939e26 100644
--- a/lib/rpmte.h
+++ b/lib/rpmte.h
@@ -365,10 +365,9 @@ rpmds rpmteDS(rpmte te, rpmTag tag);
/** \ingroup rpmte
* Retrieve file info tag set from transaction element.
* @param te transaction element
- * @param tag file info tag (RPMTAG_BASENAMES)
* @return file info tag set
*/
-rpmfi rpmteFI(rpmte te, rpmTag tag);
+rpmfi rpmteFI(rpmte te);
/** \ingroup rpmte
* Calculate transaction element dependency colors/refs from file info.
diff --git a/lib/rpmts.c b/lib/rpmts.c
index d431a1b58..4d3bf031a 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -910,7 +910,7 @@ void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
dsi = ts->dsi;
if (dsi == NULL)
return;
- fc = rpmfiFC( rpmteFI(te, RPMTAG_BASENAMES) );
+ fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
diff --git a/lib/transaction.c b/lib/transaction.c
index 147042a2f..b32f1f404 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -202,7 +202,7 @@ static void handleOverlappedFiles(const rpmts ts, const rpmte p, rpmfi fi)
struct fingerPrint_s * otherFps;
int otherFc;
- otherFi = rpmteFI(recs[otherPkgNum].p, RPMTAG_BASENAMES);
+ otherFi = rpmteFI(recs[otherPkgNum].p);
otherFileNum = recs[otherPkgNum].fileno;
/* Added packages need only look at other added packages. */
@@ -786,7 +786,7 @@ void checkInstalledFiles(rpmts ts, fingerPrintCache fpc)
for (j=0; (j<numRecs)&&gotRecs; j++) {
p = recs[j].p;
- fi = rpmteFI(p, RPMTAG_BASENAMES);
+ fi = rpmteFI(p);
/* Determine the fate of each file. */
switch (rpmteType(p)) {
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index 7416eccd3..b7427f916 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -214,29 +214,12 @@ rpmte_DS(rpmteObject * s, PyObject * args, PyObject * kwds)
static PyObject *
rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds)
{
- PyObject * TagN = NULL;
rpmfi fi;
- rpmTag tag;
- char * kwlist[] = {"tag", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:FI", kwlist, &TagN))
- return NULL;
- tag = tagNumFromPyObject(TagN);
- if (tag == -1) {
- PyErr_SetString(PyExc_TypeError, "unknown tag type");
- return NULL;
- }
-
- fi = rpmteFI(s->te, tag);
+ fi = rpmteFI(s->te);
if (fi == NULL) {
-#ifdef DYING
- PyErr_SetString(PyExc_TypeError, "invalid fi tag");
- return NULL;
-#else
Py_INCREF(Py_None);
return Py_None;
-#endif
}
return (PyObject *) rpmfi_Wrap(rpmfiLink(fi, RPMDBG_M("rpmte_FI")));
}