package

simple and robust package manager
Log | Files | Refs | README

commit 397afb75354b6c00dd62372d8de585a25e66e669
parent c056d58afc6605bfbfa034b14d62d38995c81d64
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 25 Jan 2019 00:04:27 +0100

bugfix for dependencies order

replace:
1. check for the dependency in current install list
2. recurse
3. add the dependency

with:
1. go as deep into the dependency tree as poosible through recursion
2. check for the dependency in current install list
3. add the dependency

This permits to make sure that lowest level dependencies first in the list.

Diffstat:
Mpackage.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.c b/package.c @@ -314,9 +314,9 @@ package_dep(package const *p, genalloc *packages, char const *def) if (!stralloc_cat0(&sa)) goto error; if (sa.x[package_dep_scan(&p, sa.x, sa.n)] != '\0') goto error; if (!package_version(&p, def)) goto error; + if (!package_dep(&p, packages, def)) goto error; if (package_dep_has(&p, packages)) continue; if (!genalloc_append(packages, p)) goto error; - if (!package_dep(&p, packages, def)) goto error; } if (r != 0) goto error; }