From 7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 9 Sep 2011 20:16:48 +0300 Subject: pkg: consider script failure as non-fatal Make a loud warning if the script returns failure, but do not abort installation sequence because of that. --- src/package.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/package.c b/src/package.c index 45a9677..830148c 100644 --- a/src/package.c +++ b/src/package.c @@ -912,8 +912,12 @@ int apk_ipkg_run_script(struct apk_installed_package *ipkg, unlinkat(root_fd, fn, 0); apk_id_cache_reset(&db->id_cache); - if (WIFEXITED(status)) - return WEXITSTATUS(status); + if (WIFEXITED(status)) { + int rc = WEXITSTATUS(status); + if (rc != 0) + apk_warning("%s: returned error %d", &fn[15], rc); + return 0; + } return -1; } -- cgit v1.2.3-70-g09d2