Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh] Assert dpkg is not broken before app install #652



None yet
2 participants
Copy link

commented Feb 18, 2019

The problem

Follow-up of YunoHost/issues#1284 and #638.


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.

PR Status

Tested and working

How to test

c.f. YunoHost/issues#1284 (comment)


  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@alexAubin alexAubin changed the title Assert dpkg is not broken before app install [enh] Assert dpkg is not broken before app install Feb 18, 2019

@alexAubin alexAubin added this to the 3.5.x milestone Feb 18, 2019


This comment has been minimized.

Copy link

commented Feb 20, 2019

I find it relevant that Yunohost doesn't try to install some packages on a broken system.


This comment has been minimized.

Copy link
Member Author

commented Feb 22, 2019

So today there was an interesting use case where :

  • someone installed the collaboraofficedocker app
  • when uninstall it, it broke apt for some reason related to docker-ce and whatever
  • later tried to upgrade nextcloud
  • but apt was broken, so the upgrade failed
  • and the restore of nextcloud's backup also failed, resulting in the app getting removed

TL;DR : one should not be able to try to upgrade an app if dpkg is broken or that will result in absolute disaster

@alexAubin alexAubin merged commit b274a70 into stretch-unstable Feb 24, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@alexAubin alexAubin deleted the assert-dpkg-is-not-broken-before-app-install branch Feb 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.