summaryrefslogtreecommitdiff
path: root/lib/rpmte.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-12-18 11:56:04 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-12-21 09:17:01 +0200
commit16726722c3c41e9a9f209b2b0a7ac3a0132d25ee (patch)
tree99640a472788f66fd0b8df48008495e728447af5 /lib/rpmte.c
parent4e20d4c49f1d623458a7fdc28214e6729c4e32d4 (diff)
downloadlibrpm-tizen-16726722c3c41e9a9f209b2b0a7ac3a0132d25ee.tar.gz
librpm-tizen-16726722c3c41e9a9f209b2b0a7ac3a0132d25ee.tar.bz2
librpm-tizen-16726722c3c41e9a9f209b2b0a7ac3a0132d25ee.zip
Move tsort data out of rpmte into, duh, tsortInfo
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r--lib/rpmte.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c
index 9ffe44b57..9d59400e2 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -38,10 +38,6 @@ struct rpmte_s {
rpmte depends; /*!< Package updated by this package (ERASE te) */
rpmte parent; /*!< Parent transaction element. */
- int degree; /*!< No. of immediate children. */
- int npreds; /*!< No. of predecessors. */
- int tree; /*!< Tree index. */
- int depth; /*!< Depth in dependency tree. */
unsigned int db_instance; /*!< Database instance (of removed pkgs) */
tsortInfo tsi; /*!< Dependency ordering chains. */
@@ -407,45 +403,45 @@ rpm_loff_t rpmtePkgFileSize(rpmte te)
int rpmteDepth(rpmte te)
{
- return (te != NULL ? te->depth : 0);
+ return (te && te->tsi ? te->tsi->depth : 0);
}
int rpmteSetDepth(rpmte te, int ndepth)
{
int odepth = 0;
- if (te != NULL) {
- odepth = te->depth;
- te->depth = ndepth;
+ if (te && te->tsi) {
+ odepth = te->tsi->depth;
+ te->tsi->depth = ndepth;
}
return odepth;
}
int rpmteNpreds(rpmte te)
{
- return (te != NULL ? te->npreds : 0);
+ return (te && te->tsi ? te->tsi->npreds : 0);
}
int rpmteSetNpreds(rpmte te, int npreds)
{
int opreds = 0;
- if (te != NULL) {
- opreds = te->npreds;
- te->npreds = npreds;
+ if (te && te->tsi) {
+ opreds = te->tsi->npreds;
+ te->tsi->npreds = npreds;
}
return opreds;
}
int rpmteTree(rpmte te)
{
- return (te != NULL ? te->tree : 0);
+ return (te && te->tsi ? te->tsi->tree : 0);
}
int rpmteSetTree(rpmte te, int ntree)
{
int otree = 0;
- if (te != NULL) {
- otree = te->tree;
- te->tree = ntree;
+ if (te && te->tsi) {
+ otree = te->tsi->tree;
+ te->tsi->tree = ntree;
}
return otree;
}
@@ -467,15 +463,15 @@ rpmte rpmteSetParent(rpmte te, rpmte pte)
int rpmteDegree(rpmte te)
{
- return (te != NULL ? te->degree : 0);
+ return (te && te->tsi ? te->tsi->degree : 0);
}
int rpmteSetDegree(rpmte te, int ndegree)
{
int odegree = 0;
- if (te != NULL) {
- odegree = te->degree;
- te->degree = ndegree;
+ if (te && te->tsi) {
+ odegree = te->tsi->degree;
+ te->tsi->degree = ndegree;
}
return odegree;
}