diff options
-rw-r--r-- | main.c | 5 | ||||
-rw-r--r-- | q.c | 3 | ||||
-rw-r--r-- | qatom.c | 3 | ||||
-rw-r--r-- | qcache.c | 3 | ||||
-rw-r--r-- | qcheck.c | 3 | ||||
-rw-r--r-- | qdepends.c | 13 | ||||
-rw-r--r-- | qfile.c | 3 | ||||
-rw-r--r-- | qglsa.c | 3 | ||||
-rw-r--r-- | qgrep.c | 3 | ||||
-rw-r--r-- | qlist.c | 3 | ||||
-rw-r--r-- | qlop.c | 5 | ||||
-rw-r--r-- | qpkg.c | 2 | ||||
-rw-r--r-- | qsearch.c | 3 | ||||
-rw-r--r-- | qsize.c | 3 | ||||
-rw-r--r-- | qtbz2.c | 3 | ||||
-rw-r--r-- | quse.c | 3 | ||||
-rw-r--r-- | qxpak.c | 3 | ||||
-rw-r--r-- | template.c | 3 |
18 files changed, 3 insertions, 64 deletions
@@ -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); @@ -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; } @@ -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; @@ -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; @@ -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) @@ -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) @@ -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) @@ -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) { @@ -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; @@ -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) @@ -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) { @@ -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) { @@ -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) @@ -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) @@ -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; @@ -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; @@ -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; @@ -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) |