On Wed, 2004-02-25 at 13:06 +0200, Panu Matilainen wrote: > FWIW the above manual counting is what apt-rpm does as well, and note the > comment: > // iSize = rpmdbGetIteratorCount(RpmIter); > // This doesn't seem to work right now. Code in rpm (4.0.4, at least) > // returns a 0 from rpmdbGetIteratorCount() if rpmxxInitIterator() is > // called with RPMDBI_PACKAGES or with keyp == NULL. The algorithm > // below will be used until there's support for it. > iSize = 0; > rpmdbMatchIterator countIt; > countIt = rpmxxInitIterator(Handler, RPMDBI_PACKAGES, NULL, 0); > while(rpmdbNextIterator(countIt) != NULL) > iSize++; > rpmdbFreeIterator(countIt); > > - Panu - > I thought That there should be a iterator count some where:) int offset; offset=rpmdbGetIteratorOffset(mi); printf("%d\n",offset); int iSize; iSize = rpmdbGetIteratorCount(mi); printf("%d\n",iSize); int fNum; fNum = rpmdbGetIteratorFileNum(mi); printf("%d\n",fNum); I tried all of the above from the rpmdbGetIterator... family none seem to work. Is this a bug or feature none yet implemented? Seems pretty useful. Thanks Dave Farning _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list