xbps-query: generate -o output from a single printf.
Else parts written by multiple threads can become mixed up.
This commit is contained in:
parent
0a5f86e772
commit
034d3591b3
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
||||
xbps-0.52 (???):
|
||||
|
||||
* xbps-query(1): fix a bug where the output of -o became mixed up
|
||||
when running on multiple cores.
|
||||
|
||||
xbps-0.51 (2015-12-12):
|
||||
|
||||
* zsh completion: added -U/--unpack-only support for xbps-install(1).
|
||||
|
@ -76,17 +76,19 @@ match_files_by_pattern(xbps_dictionary_t pkg_filesd,
|
||||
xbps_dictionary_get_cstring_nocopy(obj, "target", &tgt);
|
||||
if (ffd->rematch) {
|
||||
if (regexec(&ffd->regex, filestr, 0, 0, 0) == 0) {
|
||||
printf("%s: %s ", pkgver, filestr);
|
||||
if (tgt)
|
||||
printf("-> %s ", tgt);
|
||||
printf("(%s)\n", typestr);
|
||||
printf("%s: %s%s%s (%s)\n",
|
||||
pkgver, filestr,
|
||||
tgt ? " -> " : "",
|
||||
tgt ? tgt : "",
|
||||
typestr);
|
||||
}
|
||||
} else {
|
||||
if ((fnmatch(ffd->pat, filestr, FNM_PERIOD)) == 0) {
|
||||
printf("%s: %s ", pkgver, filestr);
|
||||
if (tgt)
|
||||
printf("-> %s ", tgt);
|
||||
printf("(%s)\n", typestr);
|
||||
printf("%s: %s%s%s (%s)\n",
|
||||
pkgver, filestr,
|
||||
tgt ? " -> " : "",
|
||||
tgt ? tgt : "",
|
||||
typestr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user