1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 06:41:53 +02:00

qpkg/prereq.c (resolve): cleaned up the debugging output mechanism

This commit is contained in:
Werner Almesberger 2010-11-21 10:26:17 -03:00
parent 5a0444fd7e
commit 9272f5057d

View File

@ -34,6 +34,7 @@ static struct pkg **installs = NULL;
static int n_best; /* undefined if best == NULL */
static int n_install = 0;
static int install_max = 0;
static int debug = 0;
static int epoch(const char **s, const struct id *id)
@ -111,7 +112,6 @@ static void done(void)
static void append_install(struct pkg *pkg)
{
//fprintf(stderr, "push %.*s\n", ID2PF(pkg->id));
if (n_install == install_max) {
install_max = (install_max+1)*2;
installs = realloc(installs, sizeof(*installs)*install_max);
@ -188,15 +188,17 @@ static int level = 0;
for (pkg = dep->pkg->jrb->val; pkg; pkg = pkg->more) {
if (best && n_install == n_best)
return;
#if 0
if (debug) {
fprintf(stderr, "%*s", level, "");
fprintf(stderr, "%.*s %p", ID2PF(pkg->id), pkg);
if (pkg->version)
fprintf(stderr, " %.*s", ID2PF(pkg->version));
if (pkg->mark) fprintf(stderr, " +");
if (pkg->flags & QPKG_INSTALLED) fprintf(stderr, " ***");
if (pkg->mark)
fprintf(stderr, " +");
if (pkg->flags & QPKG_INSTALLED)
fprintf(stderr, " ***");
fprintf(stderr, "\n");
#endif
}
if (!satisfies(pkg, dep))
continue;
if ((pkg->flags & QPKG_INSTALLED) || pkg->mark) {