diff options
author | Michael Schroeder <mls@suse.de> | 2009-06-15 18:29:53 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2009-06-15 18:29:53 +0200 |
commit | f6f5492739b5cc8fc52433ba13cdc6f3496fe333 (patch) | |
tree | 19d734b5d8470a66464f32de9f956dc285afb5dc /tools/dumpsolv.c | |
parent | 7abdb555bc9e456cac39b0bd193d92b6eefbf57e (diff) | |
download | libsolv-f6f5492739b5cc8fc52433ba13cdc6f3496fe333.tar.gz libsolv-f6f5492739b5cc8fc52433ba13cdc6f3496fe333.tar.bz2 libsolv-f6f5492739b5cc8fc52433ba13cdc6f3496fe333.zip |
- add FOR_REPOS macro to iterate over repos
Diffstat (limited to 'tools/dumpsolv.c')
-rw-r--r-- | tools/dumpsolv.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tools/dumpsolv.c b/tools/dumpsolv.c index aad1d24..cc6ce94 100644 --- a/tools/dumpsolv.c +++ b/tools/dumpsolv.c @@ -287,18 +287,16 @@ int main(int argc, char **argv) } #endif - for (j = 0; 1 && j < pool->nrepos; j++) + n = 0; + FOR_REPOS(j, repo) { - repo = pool->repos[j]; dump_repodata(repo); printf("repo %d contains %d solvables\n", j, repo->nsolvables); printf("repo start: %d end: %d\n", repo->start, repo->end); - for (i = repo->start, n = 1; i < repo->end; i++) + FOR_REPO_SOLVABLES(repo, i, s) { - s = pool->solvables + i; - if (s->repo != repo) - continue; + n++; printf("\n"); printf("solvable %d (%d):\n", n, i); #if 0 @@ -316,15 +314,11 @@ int main(int argc, char **argv) printids(repo, "enhances", s->enhances); if (repo->rpmdbid) printf("rpmdbid: %u\n", repo->rpmdbid[i - repo->start]); -#if 0 - dump_attrs (repo, n - 1); -#endif #endif dump_repoattrs(repo, i); #if 0 dump_some_attrs(repo, s); #endif - n++; } #if 0 tryme(repo, 0, SOLVABLE_MEDIANR, 0, 0); |