diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 16 | ||||
-rw-r--r-- | src/rpm.c | 9 |
2 files changed, 18 insertions, 7 deletions
@@ -198,9 +198,11 @@ command_list_files(int argc, const char *argv[]) struct razor_set *set; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; + razor_set_list_files(set, argv[0]); razor_set_destroy(set); @@ -214,9 +216,10 @@ command_list_file_packages(int argc, const char *argv[]) struct razor_package_iterator *pi; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; pi = razor_package_iterator_create_for_file(set, argv[0]); list_packages(pi, 0); @@ -233,9 +236,11 @@ command_list_package_files(int argc, const char *argv[]) struct razor_set *set; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; + razor_set_list_package_files(set, argv[0]); razor_set_destroy(set); @@ -824,7 +829,10 @@ command_info(int argc, const char *argv[]) const char *summary, *description, *url, *license; set = razor_set_open(repo_filename); - razor_set_open_details(set, "system-details.repo"); + if (set == NULL) + return 1; + if (razor_set_open_details(set, "system-details.repo")) + return 1; pi = razor_package_iterator_create(set); while (razor_package_iterator_next(pi, &package, &name, &version, &arch)) { @@ -350,7 +350,8 @@ get_query_packages(struct razor_set *set, int argc, const char *argv[]) files = "install/var/lib/razor/system-files.repo"; if (option_file) - razor_set_open_files(set, files); + if (razor_set_open_files(set, files)) + exit(1); query = razor_package_query_create(set); @@ -479,10 +480,12 @@ command_query(int argc, const char *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); + if (razor_set_open_details(set, details)) + return; files = "install/var/lib/razor/system-files.repo"; if (option_list) - razor_set_open_files(set, files); + if (razor_set_open_files(set, files)) + return; while (razor_package_iterator_next(pi, &package, &name, &version, &arch)) { |