diff options
author | James Bowes <jbowes@redhat.com> | 2008-06-23 14:52:39 -0400 |
---|---|---|
committer | James Bowes <jbowes@redhat.com> | 2008-06-23 14:52:39 -0400 |
commit | 298fd6434e6d144147ebf738db6cb09f5ac41095 (patch) | |
tree | 7886e6ddfffa0951536422c6b178c6728a2d59b2 /src | |
parent | 24d26c44455074dab13e5f20de9ca0a23b62edb7 (diff) | |
parent | 3f712232b97aa72f7f3a6560443f5c8a7f22363e (diff) |
Merge commit 'krh/master'
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/rpm.c | 27 |
2 files changed, 25 insertions, 5 deletions
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); |