diff options
-rw-r--r-- | librazor/iterator.c | 2 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/rpm.c | 27 |
3 files changed, 26 insertions, 6 deletions
diff --git a/librazor/iterator.c b/librazor/iterator.c index addbe68..60adebe 100644 --- a/librazor/iterator.c +++ b/librazor/iterator.c @@ -248,7 +248,7 @@ razor_package_query_finish(struct razor_package_query *pq) else index = NULL; - for (i = 0, j = 0; i < pq->count; i++) { + for (i = 0, j = 0; j < pq->count; i++) { if (!pq->vector[i]) continue; diff --git a/src/Makefile.am b/src/Makefile.am index 58f7788..19645bd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,8 @@ INCLUDES = \ -DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" -bin_PROGRAMS = razor rpm +bin_PROGRAMS = razor +noinst_PROGRAMS = rpm razor_SOURCES = main.c import-rpmdb.c import-yum.c razor_LDADD = $(RPM_LIBS) $(EXPAT_LIBS) $(CURL_LIBS) $(top_builddir)/librazor/librazor.la @@ -396,9 +396,23 @@ print_package_properties(struct razor_set *set, } static void -print_package_info(struct razor_set *set, struct razor_package *package) +print_package_info(struct razor_set *set, struct razor_package *package, + const char *name, const char *version, const char *arch) { - printf("FIXME: Package info not tracked.\n"); + const char *summary, *description, *url, *license; + + razor_package_get_details(set, package, &summary, &description, + &url, &license); + + printf("Name: %s\n", name); + printf("Arch: %s\n", arch); + printf("Version: %s\n", version); + printf("URL: %s\n", url); + printf("License: %s\n", license); + printf("Summary: %s\n", summary); + printf("Description:\n"); + printf("%s\n", description); + printf("\n"); } static void @@ -435,7 +449,7 @@ command_query(int argc, const char *argv[]) struct razor_set *set; struct razor_package_iterator *pi; struct razor_package *package; - const char *name, *version, *arch; + const char *name, *version, *arch, *details; if (option_package) { set = create_set_from_command_line(argc, argv); @@ -447,6 +461,11 @@ command_query(int argc, const char *argv[]) pi = get_query_packages(set, argc, argv); + /* FIXME: We need to figure out how to do this right. */ + details = "install/var/lib/razor/system-details.repo"; + if (option_info) + razor_set_open_details(set, details); + while (razor_package_iterator_next(pi, &package, &name, &version, &arch)) { if (option_conflicts) @@ -462,7 +481,7 @@ command_query(int argc, const char *argv[]) print_package_properties(set, package, RAZOR_PROPERTY_PROVIDES); if (option_info) - print_package_info(set, package); + print_package_info(set, package, name, version, arch); if (option_changelog) print_package_changelog(set, package); |