[PATCH] pactree: Fix vertical limbs for --optional
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
On Tue Aug 4, 2020 at 10:09 AM EDT, Sebastian Jakubiak wrote:
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
--- 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
Merged, thanks! -- Best, Daniel https://danielcapella.com
participants (2)
-
Daniel M. Capella
-
Sebastian Jakubiak