[PATCH] pactree: Fix vertical limbs for --optional
Sebastian Jakubiak
jakseb.dev at gmail.com
Tue Aug 4 14:09:48 UTC 2020
When pactree was run with -o/--optional turned on, limbs were sometimes
not properly cut off for the last children of packages that had no
optional dependencies. Example:
$ pactree -a -d2 -o libluv
libluv
|-luajit
| `-gcc-libs
`-libuv
| |-glibc
| `-libnsl
Signed-off-by: Sebastian Jakubiak <jakseb.dev at gmail.com>
---
src/pactree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pactree.c b/src/pactree.c
index e34ecc8..cf05519 100644
--- a/src/pactree.c
+++ b/src/pactree.c
@@ -540,7 +540,7 @@ static void print_dep_list(alpm_list_t *deps, alpm_list_t *dblist, alpm_pkg_t *p
};
depth->next = &d;
/* last dep, cut off the limb here */
- if((last && optional && opt_dep) || (last && !optional)) {
+ if(last) {
if(depth->prev) {
depth->prev->next = &d;
d.prev = depth->prev;
--
2.27.0
More information about the pacman-contrib
mailing list