From 8f7c2d7063df6d1057425d014ce4168d46c5e7d9 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 7 May 2010 14:07:39 +0300 Subject: Store pointer to transaction set in transaction elements - unused now but allows various new things and more element "independency" - eliminate the unused dboffset argument while at it --- lib/rpmte.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/rpmte.c') diff --git a/lib/rpmte.c b/lib/rpmte.c index 1b9b16765..30acace03 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -44,6 +44,7 @@ struct rpmte_s { rpmds obsoletes; /*!< Obsoletes: dependencies. */ rpmfi fi; /*!< File information. */ rpmps probs; /*!< Problems (relocations) */ + rpmts ts; /*!< Parent transaction */ rpm_color_t color; /*!< Color bit(s) from package dependencies. */ rpm_loff_t pkgFileSize; /*!< No. of bytes in package file (approx). */ @@ -256,6 +257,7 @@ rpmte rpmteFree(rpmte te) rpmfsFree(te->fs); rpmpsFree(te->probs); rpmteCleanDS(te); + rpmtsUnlink(te->ts); memset(te, 0, sizeof(*te)); /* XXX trash and burn */ free(te); @@ -263,14 +265,11 @@ rpmte rpmteFree(rpmte te) return NULL; } -rpmte rpmteNew(const rpmts ts, Header h, - rpmElementType type, - fnpyKey key, - rpmRelocation * relocs, - int dboffset) +rpmte rpmteNew(rpmts ts, Header h, rpmElementType type, fnpyKey key, + rpmRelocation * relocs) { rpmte p = xcalloc(1, sizeof(*p)); - + p->ts = rpmtsLink(ts); p->type = type; addTE(p, h, key, relocs); switch (type) { -- cgit v1.2.3