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

Abort postinstall if /etc/yunohost/apps ain't empty #1147

Merged
merged 3 commits into from
Jan 30, 2021

Conversation

alexAubin
Copy link
Member

The problem

Once more today, saw this issue where /etc/yunohost/installed mysteriously disappeared following some failed stuff ... (as well as yunohost-admin getting uninstalled ... why the hell ?!). Then user reinstalled yunohost-admin, and the webadmin was like "hey let's run the postinstall" which then miserably crashed

Solution

Test at the beginning of the postinstall if /etc/yunohost/apps exists, and abort if there's at least one app folder inside ... That should be a decent indicator that the system was postinstalled in the past and something funky happened

PR Status

Yolocommited

How to test

Idk try to run postinstall with non-empty /etc/yunohost/apps

…ch of init step to debian/postinst instead of 'yunohost tools postintall'
debian/postinst Outdated Show resolved Hide resolved
Co-authored-by: Kayou <pierre@kayou.io>
Copy link
Member

@kay0u kay0u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kay0u
Copy link
Member

kay0u commented Jan 27, 2021

Do you want a hotfix for 4.1 or do we merge it to 4.2?

@alexAubin
Copy link
Member Author

Hmnah 4.2 is fine ... turns out the issue the original issue was related to the user uninstalling yunohost because of apache2 >_> When a user decided they would just fuck up the system, not sure what we can do ...

@alexAubin alexAubin merged commit 35425a1 into dev Jan 30, 2021
@kay0u kay0u deleted the dont_miserably_rerun_postinstall branch January 30, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants