package

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

commit ebbe5de60058d7cd7f4c10d158c9f3c43156eeac
parent 2272f13ce0e227720e95128988c480d7bf02c863
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 20 Jan 2019 18:12:37 +0100

set PATH environment variables before using any external command

Diffstat:
Mpackage-build.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package-build.c b/package-build.c @@ -207,7 +207,14 @@ main(int argc, char **argv) if (chdir("source") == -1) log_fatal_sys_4(101, "could not change directory to ", pkg, "/", p.name); - write(1, "=== untar ===\n", 14); + write(1, "=== setenv ===\n", 15); + if (!package_env_prefix(&p, pkg, id)) + log_fatal_sys_1(100, "setting PREFIX environment variable"); + if (!package_env_dep(&p, def, pkg)) + log_fatal_sys_1(100, "setting dependencies environment variables"); + write(1, "=== end ===\n", 12); + + write(1, "\n=== untar ===\n", 15); if ((x = untar()) != 0) { char fmt[50]; fmt[fmt_long(fmt, x)] = '\0'; @@ -228,13 +235,6 @@ main(int argc, char **argv) log_fatal_sys_9(100, "copy ", pkg, "/", p.name, "/", p.ver, "/", id, "/source"); write(1, "=== end ===\n", 12); - write(1, "\n=== setenv ===\n", 16); - if (!package_env_prefix(&p, pkg, id)) - log_fatal_sys_1(100, "setting PREFIX environment variable"); - if (!package_env_dep(&p, def, pkg)) - log_fatal_sys_1(100, "setting dependencies environment variables"); - write(1, "=== end ===\n", 12); - write(1, "\n=== build ===\n", 15); if ((x = build(&p, def)) != 0) { char fmt[50];