diff options
author | Florian Festi <ffesti@redhat.com> | 2009-03-20 08:22:41 +0100 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2009-03-26 12:20:26 +0100 |
commit | 3a6f3133a1f7acccb787992008927704c9eb1254 (patch) | |
tree | 7862479fa88e0c53281fc749695be351cbb70f71 /lib/depends.c | |
parent | 3e37044eb970fc0f30942e744fb7558f4f23f528 (diff) | |
download | librpm-tizen-3a6f3133a1f7acccb787992008927704c9eb1254.tar.gz librpm-tizen-3a6f3133a1f7acccb787992008927704c9eb1254.tar.bz2 librpm-tizen-3a6f3133a1f7acccb787992008927704c9eb1254.zip |
Reimplement rpmal by using hashes and cleaning up the color handling
Diffstat (limited to 'lib/depends.c')
-rw-r--r-- | lib/depends.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/depends.c b/lib/depends.c index e9a4be835..c549fbb41 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -209,7 +209,7 @@ int rpmtsAddInstallElement(rpmts ts, Header h, (pkgNEVR ? pkgNEVR + 2 : "?pkgNEVR?"), (addNEVR ? addNEVR + 2 : "?addNEVR?")); duplicate = 1; - rpmalDel(&ts->addedPackages, p); + rpmalDel(ts->addedPackages, p); break; } } @@ -237,7 +237,7 @@ addheader: rpmcliPackagesTotal++; } - rpmalAdd(&ts->addedPackages, p, tscolor); + rpmalAdd(ts->addedPackages, p); if (!duplicate) { ts->numAddedPackages++; @@ -893,7 +893,6 @@ static inline int addRelation(rpmts ts, tsortInfo tsi; const char * Name; int teType = rpmteType(p); - int i = 0; if ((Name = rpmdsN(requires)) == NULL) return 0; @@ -1019,7 +1018,7 @@ int rpmtsOrder(rpmts ts) int breadth; int qlen; int rc; - rpmal erasedPackages = rpmalCreate(5); + rpmal erasedPackages = rpmalCreate(5, rpmtsColor(ts)); (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_ORDER), 0); @@ -1031,9 +1030,8 @@ int rpmtsOrder(rpmts ts) /* Create erased package index. */ pi = rpmtsiInit(ts); - rpm_color_t tscolor = rpmtsColor(ts); while ((p = rpmtsiNext(pi, TR_REMOVED)) != NULL) { - rpmalAdd(&erasedPackages, p, tscolor); + rpmalAdd(erasedPackages, p); } pi = rpmtsiFree(pi); rpmalMakeIndex(erasedPackages); |