Created attachment 168125 [details] Proposed fix to pass error forward. pkg(8) is not propagating error from running scripts when installing port, making it impossible to pass an error back to the make. For some reason warning is issued but error is not passed forward. The attached patch fixes the issue for us.
Hi Bapt/guys, can someone look into this? Thanks! -Max
Oups sorry I missed that one. Yes it is known, it is a choice since day one because too many scripts where failing. The level of failures here has reduced a lot so it maybe time to revisit it. Second pkg installation is not supporting a "rollback" if package fails in post installation then you are left the new binaries but the package is not registered as such. The plan is the following: - improve the transactional nature of pkg installation process (working on it right now) - apply a patch like yours to make sure things fails. For the first point I just need 2 days of free time, so that should now happen soon!
Already assigned to the maintainer.
Yay, cool. This is going to cause a headache for many existing scripts and users along with multiple flags that need to be introduced to restore previous behaviour(s). Sometimes the scripts will fail, sometimes people will want to break at the first trouble, other times they will need the script/install to resume. Rollback is nice, but if a file system oddity (e.g. missing dir) causes a package not to persist, that's going to be awkward, especially in an upgrade phase where the old package is gone and the new one can't be installed so it ends up missing.
Just as a followup it has been implemented in pkg (1.8) which should be released very very soonish