From e18d9e68260aacde0d1fe1f0fdddb008357262fe Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 29 Mar 2010 14:53:10 +0300 Subject: [PATCH] Remove unused and non-sensible depedency set build-time - Buildtime was never part of rpm version comparison nor should it be, on rpm level the only sensible differentiator between two identical dependencies is the dependency color if any. Other than that, random() just as "appropriate" as build time. --- lib/rpmds.c | 21 --------------------- lib/rpmds.h | 15 --------------- python/rpmds-py.c | 8 -------- 3 files changed, 44 deletions(-) diff --git a/lib/rpmds.c b/lib/rpmds.c index faf0ba5..141dd48 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -26,7 +26,6 @@ struct rpmds_s { rpmsenseFlags * Flags; /*!< Bit(s) identifying context/comparison. */ rpm_color_t * Color; /*!< Bit(s) calculated from file color(s). */ int32_t * Refs; /*!< No. of file refs. */ - time_t BT; /*!< Package build time tie breaker. */ rpmTag tagN; /*!< Header tag. */ int32_t Count; /*!< No. of elements */ unsigned int instance; /*!< From rpmdb instance? */ @@ -156,7 +155,6 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags) } } - ds->BT = headerGetNumber(h, RPMTAG_BUILDTIME); ds->Color = xcalloc(ds->Count, sizeof(*ds->Color)); ds->Refs = xcalloc(ds->Count, sizeof(*ds->Refs)); ds = rpmdsLink(ds); @@ -222,7 +220,6 @@ static rpmds singleDS(rpmTag tagN, const char * N, const char * EVR, ds = xcalloc(1, sizeof(*ds)); ds->Type = Type; ds->tagN = tagN; - ds->BT = time(NULL); ds->Count = 1; ds->nopromote = _rpmds_nopromote; ds->instance = instance; @@ -340,24 +337,6 @@ rpmTag rpmdsTagN(const rpmds ds) return tagN; } -time_t rpmdsBT(const rpmds ds) -{ - time_t BT = 0; - if (ds != NULL && ds->BT > 0) - BT = ds->BT; - return BT; -} - -time_t rpmdsSetBT(const rpmds ds, time_t BT) -{ - time_t oBT = 0; - if (ds != NULL) { - oBT = ds->BT; - ds->BT = BT; - } - return oBT; -} - unsigned int rpmdsInstance(rpmds ds) { return (ds != NULL) ? ds->instance : 0; diff --git a/lib/rpmds.h b/lib/rpmds.h index e71b866..6d0f307 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -209,21 +209,6 @@ rpmTag rpmdsTagN(const rpmds ds); unsigned int rpmdsInstance(rpmds ds); /** \ingroup rpmds - * Return dependency build time. - * @param ds dependency set - * @return dependency build time, 0 on invalid - */ -time_t rpmdsBT(const rpmds ds); - -/** \ingroup rpmds - * Set dependency build time. - * @param ds dependency set - * @param BT build time - * @return dependency build time, 0 on invalid - */ -time_t rpmdsSetBT(const rpmds ds, time_t BT); - -/** \ingroup rpmds * Return current "Don't promote Epoch:" flag. * * This flag controls for Epoch: promotion when a dependency set is diff --git a/python/rpmds-py.c b/python/rpmds-py.c index 0e98d33..069519d 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -54,12 +54,6 @@ rpmds_Flags(rpmdsObject * s) } static PyObject * -rpmds_BT(rpmdsObject * s) -{ - return Py_BuildValue("i", (int) rpmdsBT(s->ds)); -} - -static PyObject * rpmds_TagN(rpmdsObject * s) { return Py_BuildValue("i", rpmdsTagN(s->ds)); @@ -207,8 +201,6 @@ static struct PyMethodDef rpmds_methods[] = { "ds.EVR -> EVR - Return current EVR.\n" }, {"Flags", (PyCFunction)rpmds_Flags, METH_NOARGS, "ds.Flags -> Flags - Return current Flags.\n" }, - {"BT", (PyCFunction)rpmds_BT, METH_NOARGS, - "ds.BT -> BT - Return build time.\n" }, {"TagN", (PyCFunction)rpmds_TagN, METH_NOARGS, "ds.TagN -> TagN - Return current TagN.\n" }, {"Color", (PyCFunction)rpmds_Color, METH_NOARGS, -- 2.7.4