Bug 42588 - App-Center: debian {pre,post}{inst,rm} script errors leaves the app-center in a broken state
Summary: App-Center: debian {pre,post}{inst,rm} script errors leaves the app-center in...
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: App Center
Version: UCS 4.1
Hardware: Other All
: P5 normal
Target Milestone: ---
Assignee: App Center maintainers
QA Contact:
URL:
Keywords:
Depends on: 42586
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-06 18:00 CEST by Lukas Oyen
Modified: 2019-01-03 07:24 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Oyen univentionstaff 2016-10-06 18:00:40 CEST
The App-Center is left in a mostly unusable state, if the user tries to install/remove an app, where the debian preinst-, prerm- or postrm-script fails with an error (exit 1 - please refer to the ucs-test 20_appcenter/79_umc_broken_failure_error_exit_code).

In case of an error in the preinst-script, the installation works and yield error messages. The app is displayed as installed, but the removal fails during the dry-run.

In case of an error in the prerm-script, the app installs as usual and the removal yields error messages. A second install thereafter fails during the dry-run.

In case of an error in the postrm-script, the app installs as usual and the removal yields error messages. A second install thereafter fails during the dry-run. Attempting to install any other app from now on fails as the app-center tries to clean up the broken app.

+++ This bug was initially created as a clone of Bug #42586 +++

We need tests to test the current behaviour in the following scenarios:

- Test to capture the behaviour in case of an `exit 1` in the preinst script
- Test to capture the behaviour in case of an `exit 1` in the postinst script
- Test to capture the behaviour in case of an `exit 1` in the prerm script
- Test to capture the behaviour in case of an `exit 1` in the postrm script

+++ This bug was initially created as a clone of Bug #42580 +++

We need tests that verify that the App Center works now.

We can then test whether a switch breaks anything.

+++ This bug was initially created as a clone of Bug #40064 +++

Currently, the UMC App Center installs, updates, uninstalls non-docker Apps with the old Application class.

It should instead use the new App class.

Some work still has to go into these functions, but it would be far better to use them.

No double bug fixing when a dysfunctional routine is implemented in both classes.

Support of docker features like a preinst script without additional implementation effort.

Startup speed increases as the App cache only needs to be loaded once.

The following things do not work at the moment:
Dry run - there is no package list to get before installing an app.
Connection to other hosts is currently done via "ssh univention-app ...". This may be a problem for non 4.1 systems.

univention-app installs directly via apt-get, not with the PackageManager class. This should not make a difference, yet it needs to be tested thoroughly.
Comment 1 Stefan Gohmann univentionstaff 2019-01-03 07:24:07 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.