Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
debug: fix printing the namespaces
Baptiste Daroussin committed 2 years ago
commit 86f938eb988e204f1e7a3dbf7ae77b0fae2e0262
parent 659271e
1 file changed +5 -3
modified libpkg/pkg_event.c
@@ -1009,11 +1009,13 @@ pkg_dbg(uint64_t flags, int level, const char *fmt, ...)
	ev.type = PKG_EVENT_DEBUG;
	ev.e_debug.level = level;
	for (size_t i = 0; i < NELEM(debug_flags); i++) {
-
		if (ctx.debug_flags & debug_flags[i].flag) {
-
			if (string_fmt->size == 0)
+
		if (flags & debug_flags[i].flag) {
+
			if (string_fmt->size == 0) {
				fprintf(string_fmt->fp, "(%s", debug_flags[i].name);
-
			else
+
				fflush(string_fmt->fp);
+
			} else {
				fprintf(string_fmt->fp, "|%s", debug_flags[i].name);
+
			}
		}
	}
	fprintf(string_fmt->fp, ") %s", fmt);