On Tue, 2004-02-24 at 23:05 -0600, David Farning wrote: > Is there a way to determine the total number of packages in the rpmdb? > I've been trying variations on the following with no luck. > > num =rpmdbCountPackages(db, NULL); > > It's easy to-- > > mi = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); > if (mi) { > while ((h = rpmdbNextIterator(mi)) != NULL) > num++; > } in the python modules there is an count() method to an mi instance but from my tests it doesn't appear to return anything useful - but I thought it was supposed to return the number of match iterators counted. You might want to check out that code in the python modules. -sv _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list