xbps_remove_obsoletes: make xbps_printf conditionalized with XBPS_FLAG_VERBOSE.

This commit is contained in:
Juan RP 2011-01-29 16:26:17 +01:00
parent 36c7cc3bec
commit 8d6eab5ac1

View File

@ -46,7 +46,7 @@ xbps_remove_obsoletes(prop_dictionary_t oldd, prop_dictionary_t newd)
const char *array_str = "files"; const char *array_str = "files";
const char *oldhash; const char *oldhash;
char *file; char *file;
int rv = 0; int rv = 0, flags = xbps_get_flags();
bool found, dodirs = false, dolinks = false; bool found, dodirs = false, dolinks = false;
assert(oldd != NULL); assert(oldd != NULL);
@ -135,8 +135,10 @@ again:
free(file); free(file);
continue; continue;
} }
if (flags & XBPS_FLAG_VERBOSE)
xbps_printf("Removed obsolete entry: %s\n", xbps_printf("Removed obsolete entry: %s\n",
prop_string_cstring_nocopy(oldstr)); prop_string_cstring_nocopy(oldstr));
free(file); free(file);
} }
if (!dolinks) { if (!dolinks) {