pactree: removed 'provision' from linear output
Linear output is especially useful when piped to other commands, e.g. $ pactree -lu pacman | pacman -Qqkk - The above command would previously show errors on packages with provisions. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b9601b1e59
commit
0deeb9991c
|
@ -363,10 +363,13 @@ static void print_text(const char *pkg, const char *provision,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* print tip */
|
/* print tip */
|
||||||
|
/* If style->provides is empty (e.g. when using linear style), we do not
|
||||||
|
* want to print the provided package. This makes output easier to parse and
|
||||||
|
* to reuse. */
|
||||||
if(!pkg && provision) {
|
if(!pkg && provision) {
|
||||||
printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
|
printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
|
||||||
provision, color->branch1, color->off);
|
provision, color->branch1, color->off);
|
||||||
} else if(provision && strcmp(pkg, provision) != 0) {
|
} else if(provision && strcmp(pkg, provision) != 0 && *(style->provides) != '\0') {
|
||||||
printf("%s%s%s%s%s %s%s%s\n", tip, color->leaf1, pkg,
|
printf("%s%s%s%s%s %s%s%s\n", tip, color->leaf1, pkg,
|
||||||
color->leaf2, style->provides, color->leaf1, provision,
|
color->leaf2, style->provides, color->leaf1, provision,
|
||||||
color->off);
|
color->off);
|
||||||
|
|
Loading…
Reference in New Issue