[PATCH] pactree: Fix vertical limbs for --optional

Daniel M. Capella polyzen at archlinux.org
Wed Sep 2 19:39:20 UTC 2020


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 <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

Merged, thanks!

--
Best,
Daniel <https://danielcapella.com>


More information about the pacman-contrib mailing list