1.1 --- a/main.c Wed Apr 09 21:14:36 2008 -0400
1.2 +++ b/main.c Mon Jun 09 12:47:37 2008 -0400
1.3 @@ -77,6 +77,7 @@
1.4 list_properties(const char *package_name,
1.5 enum razor_property_type required_type)
1.6 {
1.7 + static const char *relation_string[] = { "<", "<=", "=", ">=", ">" };
1.8 struct razor_set *set;
1.9 struct razor_property *property;
1.10 struct razor_package *package;
1.11 @@ -101,7 +102,7 @@
1.12 printf("%s\n", name);
1.13 else
1.14 printf("%s %s %s\n", name,
1.15 - razor_version_relations[relation], version);
1.16 + relation_string[relation], version);
1.17 }
1.18 razor_property_iterator_destroy(pi);
1.19
1.20 @@ -361,20 +362,6 @@
1.21 }
1.22
1.23 static int
1.24 -command_validate(int argc, const char *argv[])
1.25 -{
1.26 - struct razor_set *set;
1.27 -
1.28 - set = razor_set_open(repo_filename);
1.29 - if (set == NULL)
1.30 - return 1;
1.31 - razor_set_list_unsatisfied(set);
1.32 - razor_set_destroy(set);
1.33 -
1.34 - return 0;
1.35 -}
1.36 -
1.37 -static int
1.38 mark_packages_for_update(struct razor_transaction *trans,
1.39 struct razor_set *set, const char *pattern)
1.40 {
1.41 @@ -387,7 +374,7 @@
1.42 while (razor_package_iterator_next(pi, &package,
1.43 &name, &version, &arch)) {
1.44 if (pattern && fnmatch(pattern, name, 0) == 0) {
1.45 - razor_transaction_install_package(trans, package);
1.46 + razor_transaction_update_package(trans, package);
1.47 matches++;
1.48 }
1.49 }
1.50 @@ -434,7 +421,7 @@
1.51 if (argc == 0)
1.52 razor_transaction_update_all(trans);
1.53 for (i = 0; i < argc; i++) {
1.54 - if (mark_packages_for_update(trans, upstream, argv[i]) == 0) {
1.55 + if (mark_packages_for_update(trans, set, argv[i]) == 0) {
1.56 fprintf(stderr, "no match for %s\n", argv[i]);
1.57 return 1;
1.58 }
1.59 @@ -828,7 +815,6 @@
1.60 { "import-yum", "import yum metadata files", command_import_yum },
1.61 { "import-rpmdb", "import the system rpm database", command_import_rpmdb },
1.62 { "import-rpms", "import rpms from the given directory", command_import_rpms },
1.63 - { "validate", "validate a package set", command_validate },
1.64 { "update", "update all or specified packages", command_update },
1.65 { "remove", "remove specified packages", command_remove },
1.66 { "diff", "show diff between two package sets", command_diff },