aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c5
-rw-r--r--q.c3
-rw-r--r--qatom.c3
-rw-r--r--qcache.c3
-rw-r--r--qcheck.c3
-rw-r--r--qdepends.c13
-rw-r--r--qfile.c3
-rw-r--r--qglsa.c3
-rw-r--r--qgrep.c3
-rw-r--r--qlist.c3
-rw-r--r--qlop.c5
-rw-r--r--qpkg.c2
-rw-r--r--qsearch.c3
-rw-r--r--qsize.c3
-rw-r--r--qtbz2.c3
-rw-r--r--quse.c3
-rw-r--r--qxpak.c3
-rw-r--r--template.c3
18 files changed, 3 insertions, 64 deletions
diff --git a/main.c b/main.c
index be25d08b..c571ef70 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 443ce4be..53b359f6 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 16445dd1..acf9fd67 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 d4b7884b..759e50a1 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 6ad5f85c..cdbc5070 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 5ded84b1..197c3767 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 6d36e968..50820934 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 7bc350f4..885ce1ee 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 e7c2c10f..7551ebbb 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 d17ba5ed..cd52bf04 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 f2f97c6d..546c3531 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 2c9e774a..996efcde 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 b7c992e1..2ba2d398 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 486edcf3..7a2503aa 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 9208097b..da2e9ab1 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 2ac6cad1..59db37a6 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 d7cec6f6..fb19ef96 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 eff93e84..d4b9e987 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)