summaryrefslogtreecommitdiff
path: root/lib/rpmte.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-05-07 14:07:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-05-07 14:16:18 +0300
commit8f7c2d7063df6d1057425d014ce4168d46c5e7d9 (patch)
treef1fc34981466d59f11b9bf80acf2ecca21caaf0b /lib/rpmte.c
parent0782ee6b71b2cdad2a6fb6ff2f90d506e3230eb2 (diff)
downloadrpm-8f7c2d7063df6d1057425d014ce4168d46c5e7d9.tar.gz
rpm-8f7c2d7063df6d1057425d014ce4168d46c5e7d9.tar.bz2
rpm-8f7c2d7063df6d1057425d014ce4168d46c5e7d9.zip
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
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r--lib/rpmte.c11
1 files changed, 5 insertions, 6 deletions
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) {