diff options
author | jbj <devnull@localhost> | 2002-05-16 16:55:21 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-05-16 16:55:21 +0000 |
commit | 076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf (patch) | |
tree | c79f91a35a1134d5cd67394c534e804405697d61 /tools | |
parent | bc9d22eeb9034966654091306e3e3fc9a9dd7c71 (diff) | |
download | rpm-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.tar.gz rpm-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.tar.bz2 rpm-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.zip |
- opaque (well mostly) rpmTransactionSet using methods.
CVS patchset: 5437
CVS date: 2002/05/16 16:55:21
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 3 | ||||
-rw-r--r-- | tools/dumpdb.c | 3 | ||||
-rw-r--r-- | tools/rpmsort.c | 13 | ||||
-rw-r--r-- | tools/tpkgid.c | 6 |
4 files changed, 14 insertions, 11 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 99554ca41..3b25d453d 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign -INCLUDES = \ - -I$(top_srcdir) \ +INCLUDES = -I. \ -I$(top_srcdir)/build \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/rpmdb \ diff --git a/tools/dumpdb.c b/tools/dumpdb.c index 66fdd642e..745c81ba3 100644 --- a/tools/dumpdb.c +++ b/tools/dumpdb.c @@ -2,6 +2,9 @@ #include <rpmlib.h> #include "header_internal.h" + +#include "rpmdb.h" + #include "debug.h" int main(int argc, char ** argv) diff --git a/tools/rpmsort.c b/tools/rpmsort.c index 04052f141..5b8acea5a 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -4,6 +4,7 @@ #include <rpmmacro.h> #include <rpmurl.h> +#include "rpmdb.h" #include "rpmte.h" #include "rpmts.h" @@ -64,7 +65,7 @@ do_tsort(const char *fileArgv[]) if (fileArgv == NULL) return 0; - ts = rpmtransCreateSet(NULL, NULL); + ts = rpmtsCreate(); if (!noChainsaw) ts->transFlags = RPMTRANS_FLAG_CHAINSAW; @@ -89,7 +90,7 @@ do_tsort(const char *fileArgv[]) } mi = rpmdbInitIterator(avdb, RPMDBI_PACKAGES, NULL, 0); while ((h = rpmdbNextIterator(mi)) != NULL) { - rpmtransAvailablePackage(ts, h, NULL); + rpmtsAvailablePackage(ts, h, NULL); } endavail: @@ -168,7 +169,7 @@ restart: } if (rc == 0) { - rc = rpmtransAddPackage(ts, h, (fnpyKey)fileName, 0, NULL); + rc = rpmtsAddPackage(ts, h, (fnpyKey)fileName, 0, NULL); headerFree(h, "do_tsort"); continue; } @@ -211,7 +212,7 @@ restart: if (!noDeps) { rpmProblemSet ps; - rc = rpmdepCheck(ts); + rc = rpmtsCheck(ts); ps = rpmtsGetProblems(ts); if (ps) { @@ -224,7 +225,7 @@ restart: ps = rpmProblemSetFree(ps); } - rc = rpmdepOrder(ts); + rc = rpmtsOrder(ts); if (rc) goto exit; @@ -373,7 +374,7 @@ exit: pkgURL = _free(pkgURL); argv = _free(argv); - ts = rpmtransFree(ts); + ts = rpmtsFree(ts); return rc; } diff --git a/tools/tpkgid.c b/tools/tpkgid.c index ad1c68692..246a569fc 100644 --- a/tools/tpkgid.c +++ b/tools/tpkgid.c @@ -419,7 +419,6 @@ main(int argc, const char *argv[]) { poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0); const char * rootDir = ""; - rpmdb db = NULL; rpmTransactionSet ts = NULL; FTS * ftsp; FTSENT * fts; @@ -445,7 +444,8 @@ main(int argc, const char *argv[]) rpmIncreaseVerbosity(); } - ts = rpmtransCreateSet(db, rootDir); + ts = rpmtsCreate(); + (void) rpmtsSetRootDir(rootDir); (void) rpmtsOpenDB(ts, O_RDONLY); if (verify_legacy) { ts->dig = pgpNewDig(); @@ -467,7 +467,7 @@ main(int argc, const char *argv[]) ftsPrintPaths(stdout); freeItems(); - ts = rpmtransFree(ts); + ts = rpmtsFree(ts); return ec; } |