summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-09-09 20:16:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-09-09 20:16:48 +0300
commit7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe (patch)
tree3f34865232f938962b273771c9bcaa946026ff0e /src/package.c
parentbfd53b59d2e62e17e95df3f3d2948d2bb806db71 (diff)
downloadapk-tools-7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe.tar.gz
apk-tools-7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe.tar.bz2
apk-tools-7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe.tar.xz
apk-tools-7d5cd2c8a0052a7446515f90d3d0ea5cc2e93efe.zip
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.
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c8
1 files changed, 6 insertions, 2 deletions
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;
}