Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[enh] Assert dpkg is not broken before app install #652
Make sure that dpkg/apt ain't broken before starting to install an app. This could also be done for other scripts which are quite likely to rely on apt : upgrade, remove and restore. I don't know if that's relevant though ... e.g. maybe we want people (or yunohost) to trigger removals even if dpkg/apt is broken ? I dunno ...
Note that the plan is anyway to add this check in ynh_apt though #638 but the plan is to, where relevant, avoid starting to run a whole script if we can know it's gonna fail anyway.
Tested and working
How to test
So today there was an interesting use case where :
TL;DR : one should not be able to try to upgrade an app if dpkg is broken or that will result in absolute disaster