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;
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);
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;
char const *linktarget;
char *link;
- foundfi = rpmteFI(recs[i].p, RPMTAG_BASENAMES);
+ foundfi = rpmteFI(recs[i].p);
fiFX = rpmfiFX(foundfi);
filenr = recs[i].fileno;
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;
/** \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.
dsi = ts->dsi;
if (dsi == NULL)
return;
- fc = rpmfiFC( rpmteFI(te, RPMTAG_BASENAMES) );
+ fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
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. */
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)) {
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")));
}