summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-12 20:07:00 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-12 20:07:00 (EST)
commit9238a38ba9d4f240ffc96a67634bb62a680ac033 (patch)
tree5ef79630a4bf4c0ba183f30d9fe231a5fbde04f0
parent1e92bab925599c6162c7824d20ec70fca6f9fe59 (diff)
Compare verbosity to a message_level_t.
git-svn-id: http://opkg.googlecode.com/svn/trunk@293 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/opkg_cmd.c10
-rw-r--r--libopkg/pkg_hash.c2
2 files changed, 5 insertions, 7 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index afa9ccf..9a49082 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -758,7 +758,7 @@ static int opkg_info_status_cmd(opkg_conf_t *conf, int argc, char **argv, int in
pkg_formatted_info(stdout, pkg);
- if (conf->verbosity > 1) {
+ if (conf->verbosity >= OPKG_NOTICE) {
conffile_list_elt_t *iter;
for (iter = nv_pair_list_first(&pkg->conffiles); iter; iter = nv_pair_list_next(&pkg->conffiles, iter)) {
conffile_t *cf = (conffile_t *)iter->data;
@@ -1080,8 +1080,7 @@ static int opkg_depends_cmd(opkg_conf_t *conf, int argc, char **argv)
for (l = 0; l < cdepend->possibility_count; l++) {
depend_t *possibility = cdepend->possibilities[l];
opkg_message(conf, OPKG_ERROR, " %s", possibility->pkg->name);
- if (conf->verbosity > 0) {
- // char *ver = abstract_pkg_version_str_alloc(possibility->pkg);
+ if (conf->verbosity >= OPKG_NOTICE) {
opkg_message(conf, OPKG_NOTICE, " %s", possibility->version);
if (possibility->version) {
char *typestr = NULL;
@@ -1095,7 +1094,6 @@ static int opkg_depends_cmd(opkg_conf_t *conf, int argc, char **argv)
}
opkg_message(conf, OPKG_NOTICE, " (%s %s)", typestr, possibility->version);
}
- // free(ver);
}
opkg_message(conf, OPKG_ERROR, "\n");
}
@@ -1183,9 +1181,9 @@ static int opkg_what_depends_conflicts_cmd(opkg_conf_t *conf, enum what_field_ty
pkg_mark_provides(pkg);
changed++;
- opkg_message(conf, OPKG_NOTICE, " %s", pkg->name);
- if (conf->verbosity > 0) {
+ if (conf->verbosity >= OPKG_NOTICE) {
char *ver = pkg_version_str_alloc(pkg);
+ opkg_message(conf, OPKG_NOTICE, " %s", pkg->name);
opkg_message(conf, OPKG_NOTICE, " %s", ver);
opkg_message(conf, OPKG_NOTICE, "\t%s %s", rel_str, possibility->pkg->name);
if (possibility->version) {
diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
index a445839..62e6f0a 100644
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
@@ -325,7 +325,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf, abstract_pk
}
- if (matching_apkgs->len > 1 && conf->verbosity > 1) {
+ if (conf->verbosity >= OPKG_NOTICE && matching_apkgs->len > 1) {
opkg_message(conf, OPKG_NOTICE, "%s: for apkg=%s, %d matching pkgs\n",
__FUNCTION__, apkg->name, matching_pkgs->len);
for (i = 0; i < matching_pkgs->len; i++) {