From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D74301384B4 for ; Thu, 17 Dec 2015 05:06:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40236E084C; Thu, 17 Dec 2015 05:06:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A35DE084C for ; Thu, 17 Dec 2015 05:06:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4B313340564 for ; Thu, 17 Dec 2015 05:06:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57C8FCAF for ; Thu, 17 Dec 2015 05:06:21 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1450327223.1d4228adcfe4489bd330076e2b1004905d97d6cc.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c q.c qatom.c qcache.c qcheck.c qdepends.c qfile.c qglsa.c qgrep.c qlist.c qlop.c qpkg.c qsearch.c qsize.c qtbz2.c quse.c qxpak.c template.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 1d4228adcfe4489bd330076e2b1004905d97d6cc X-VCS-Branch: master Date: Thu, 17 Dec 2015 05:06:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6b3f53d3-c0ec-435a-8eaa-f4810ea44918 X-Archives-Hash: 0f69bab6aa77508b7ee15bcdd663d616 commit: 1d4228adcfe4489bd330076e2b1004905d97d6cc Author: Mike Frysinger gentoo org> AuthorDate: Thu Dec 17 04:40:23 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Dec 17 04:40:23 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1d4228ad clean up old debug statements Much of this debug output has outlived its usefulness now that the code has stabilized. Clean it all up to make the debug builds way less noisy and keep from breaking the tests. main.c | 5 +++-- q.c | 3 --- qatom.c | 3 --- qcache.c | 3 --- qcheck.c | 3 --- qdepends.c | 13 ------------- qfile.c | 3 --- qglsa.c | 3 --- qgrep.c | 3 --- qlist.c | 3 --- qlop.c | 5 ----- qpkg.c | 2 -- qsearch.c | 3 --- qsize.c | 3 --- qtbz2.c | 3 --- quse.c | 3 --- qxpak.c | 3 --- template.c | 3 --- 18 files changed, 3 insertions(+), 64 deletions(-) diff --git a/main.c b/main.c index be25d08..c571ef7 100644 --- a/main.c +++ b/main.c @@ -592,7 +592,8 @@ _q_static void read_portage_env_file(const char *configroot, const char *file, e FILE *fp; char *buf, *s, *p; - IF_DEBUG(fprintf(stderr, "profile %s\n", file)); + if (getenv("DEBUG")) + fprintf(stderr, "profile %s\n", file); configroot_len = strlen(configroot); file_len = strlen(file); @@ -885,7 +886,7 @@ void initialize_portage_env(void) } } - if (getenv("DEBUG") IF_DEBUG(|| 1)) { + if (getenv("DEBUG")) { for (i = 0; vars_to_read[i].name; ++i) { var = &vars_to_read[i]; fprintf(stderr, "%s = ", var->name); diff --git a/q.c b/q.c index 443ce4b..53b359f 100644 --- a/q.c +++ b/q.c @@ -32,7 +32,6 @@ static APPLET lookup_applet(const char *applet) for (i = 0; applets[i].name; ++i) { if (strcmp(applets[i].name, applet) == 0) { - DBG("found applet %s at %p", applets[i].name, applets[i].func); argv0 = applets[i].name; if (i && applets[i].desc != NULL) ++argv0; /* chop the leading 'q' */ return applets[i].func; @@ -40,10 +39,8 @@ static APPLET lookup_applet(const char *applet) } /* No applet found? Search by shortname then... */ - DBG("Looking up applet (%s) by short name", applet); for (i = 1; applets[i].desc != NULL; ++i) { if (strcmp(applets[i].name + 1, applet) == 0) { - DBG("found applet by short name %s", applets[i].name); argv0 = applets[i].name + 1; return applets[i].func; } diff --git a/qatom.c b/qatom.c index 16445dd..acf9fd6 100644 --- a/qatom.c +++ b/qatom.c @@ -109,9 +109,6 @@ int qatom_main(int argc, char **argv) depend_atom *atom; int i; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QATOM, qatom, "")) != -1) { switch (i) { case 'F': format = optarg; break; diff --git a/qcache.c b/qcache.c index d4b7884..759e50a 100644 --- a/qcache.c +++ b/qcache.c @@ -912,9 +912,6 @@ int qcache_main(int argc, char **argv) { int i, action = 0; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QCACHE, qcache, "")) != -1) { switch (i) { case 'p': qcache_matchpkg = optarg; break; diff --git a/qcheck.c b/qcheck.c index 6ad5f85..cdbc507 100644 --- a/qcheck.c +++ b/qcheck.c @@ -373,9 +373,6 @@ int qcheck_main(int argc, char **argv) .exact = false, }; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QCHECK, qcheck, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qcheck) diff --git a/qdepends.c b/qdepends.c index 5ded84b..197c376 100644 --- a/qdepends.c +++ b/qdepends.c @@ -411,17 +411,12 @@ _q_static int qdepends_main_vdb_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) if (i == state->argc) return 0; - IF_DEBUG(warn("matched %s/%s", catname, pkgname)); - if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len)) return 0; - IF_DEBUG(warn("growing tree...")); dep_tree = dep_grow_tree(depend); if (dep_tree == NULL) return 0; - IF_DEBUG(puts(depend)); - IF_DEBUG(dep_dump_tree(dep_tree)); if (qdep_name_only) { depend_atom *atom = NULL; @@ -474,17 +469,12 @@ _q_static int qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv) static size_t depend_len, use_len; dep_node *dep_tree; - IF_DEBUG(warn("matched %s/%s for %s", catname, pkgname, state->depend_file)); - if (!q_vdb_pkg_eat(pkg_ctx, state->depend_file, &depend, &depend_len)) return 0; - IF_DEBUG(warn("growing tree...")); dep_tree = dep_grow_tree(depend); if (dep_tree == NULL) return 0; - IF_DEBUG(puts(depend)); - IF_DEBUG(dep_dump_tree(dep_tree)); if (q_vdb_pkg_eat(pkg_ctx, "USE", &use, &use_len)) use[0] = '\0'; @@ -539,9 +529,6 @@ int qdepends_main(int argc, char **argv) depend_file = depend_files[0]; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QDEPENDS, qdepends, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qdepends) diff --git a/qfile.c b/qfile.c index 6d36e96..5082093 100644 --- a/qfile.c +++ b/qfile.c @@ -407,9 +407,6 @@ int qfile_main(int argc, char **argv) FILE *args_file = NULL; int max_args = QFILE_DEFAULT_MAX_ARGS; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QFILE, qfile, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qfile) diff --git a/qglsa.c b/qglsa.c index 7bc350f..885ce1e 100644 --- a/qglsa.c +++ b/qglsa.c @@ -285,9 +285,6 @@ int qglsa_main(int argc, char **argv) qglsa_action action = GLSA_FUNKYTOWN; bool all_glsas = false; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QGLSA, qglsa, "")) != -1) { #define set_action(a) { if (action == 0) action = a; else err("cannot specify more than one action at a time"); } switch (i) { diff --git a/qgrep.c b/qgrep.c index e7c2c10..7551ebb 100644 --- a/qgrep.c +++ b/qgrep.c @@ -261,9 +261,6 @@ int qgrep_main(int argc, char **argv) QGREP_STR_FUNC strfunc = strstr; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - do_count = do_regex = do_eclass = do_installed = do_list = 0; show_filename = skip_comments = invert_list = show_name = 0; diff --git a/qlist.c b/qlist.c index d17ba5e..cd52bf0 100644 --- a/qlist.c +++ b/qlist.c @@ -379,9 +379,6 @@ int qlist_main(int argc, char **argv) }; int i, ret; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QLIST, qlist, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qlist) diff --git a/qlop.c b/qlop.c index f2f97c6..546c353 100644 --- a/qlop.c +++ b/qlop.c @@ -107,8 +107,6 @@ show_merge_times(char *package, const char *logfile, int average, char human_rea pkg = package; } - DBG("Searching for %s in %s\n", pkg, logfile); - if ((fp = fopen(logfile, "r")) == NULL) { warnp("Could not open logfile '%s'", logfile); return 1; @@ -645,9 +643,6 @@ int qlop_main(int argc, char **argv) char do_time, do_list, do_unlist, do_sync, do_current, do_human_readable = 0; char *logfile = NULL; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - do_time = do_list = do_unlist = do_sync = do_current = 0; while ((i = GETOPT_LONG(QLOP, qlop, "")) != -1) { diff --git a/qpkg.c b/qpkg.c index 2c9e774..996efcd 100644 --- a/qpkg.c +++ b/qpkg.c @@ -320,8 +320,6 @@ int qpkg_main(int argc, char **argv) depend_atom *atom; int restrict_chmod = 0; int qclean = 0; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); while ((i = GETOPT_LONG(QPKG, qpkg, "")) != -1) { switch (i) { diff --git a/qsearch.c b/qsearch.c index b7c992e..2ba2d39 100644 --- a/qsearch.c +++ b/qsearch.c @@ -140,9 +140,6 @@ int qsearch_main(int argc, char **argv) int i; void (*search_func)(int, const char *, const char *, char *last, bool, bool, bool, bool, bool); - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QSEARCH, qsearch, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qsearch) diff --git a/qsize.c b/qsize.c index 486edcf..7a2503a 100644 --- a/qsize.c +++ b/qsize.c @@ -52,9 +52,6 @@ int qsize_main(int argc, char **argv) char filename[_Q_PATH_MAX], *filename_root; queue *ignore_regexp = NULL; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QSIZE, qsize, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qsize) diff --git a/qtbz2.c b/qtbz2.c index 9208097..da2e9ab 100644 --- a/qtbz2.c +++ b/qtbz2.c @@ -244,9 +244,6 @@ int qtbz2_main(int argc, char **argv) char *heap_tbz2, *heap_xpak, *heap_tarbz2; char *tbz2, *xpak, *tarbz2; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - action = TBZ2_ACT_NONE; dir_fd = AT_FDCWD; diff --git a/quse.c b/quse.c index 2ac6cad..59db37a 100644 --- a/quse.c +++ b/quse.c @@ -242,9 +242,6 @@ int quse_main(int argc, char **argv) size_t n; const char *overlay; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QUSE, quse, "")) != -1) { switch (i) { case 'e': regexp_matching = 0; break; diff --git a/qxpak.c b/qxpak.c index d7cec6f..fb19ef9 100644 --- a/qxpak.c +++ b/qxpak.c @@ -379,9 +379,6 @@ int qxpak_main(int argc, char **argv) char *xpak; char action = XPAK_ACT_NONE; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - dir_fd = AT_FDCWD; xpak_stdout = 0; diff --git a/template.c b/template.c index eff93e8..d4b9e98 100644 --- a/template.c +++ b/template.c @@ -21,9 +21,6 @@ int qtemp_main(int argc, char **argv) { int i; - DBG("argc=%d argv[0]=%s argv[1]=%s", - argc, argv[0], argc > 1 ? argv[1] : "NULL?"); - while ((i = GETOPT_LONG(QTEMP, qtemp, "")) != -1) { switch (i) { COMMON_GETOPTS_CASES(qtemp)