Bug 7698 - zypper backend doesn't log the exit code
Summary: zypper backend doesn't log the exit code
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 13:55 CEST by Frida Flodin
Modified: 2021-08-24 12:51 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Frida Flodin cendio 2021-04-29 13:55:36 CEST
Zypper has alot of exit codes that can tell us something about what went wrong. Right now tl-setup will just shut down and tell us that something went wrong with the installation.

This is the end in tlsetup.log

> 2021-04-29 11:46:39,378: Installing python-gtk-2.24.0-8.27.x86_64: 45 %
> 2021-04-29 11:46:39,379: Installing python-gtk-2.24.0-8.27.x86_64: 56 %
> 2021-04-29 11:46:39,379: Installing python-gtk-2.24.0-8.27.x86_64: 67 %
> 2021-04-29 11:46:39,379: Installing python-gtk-2.24.0-8.27.x86_64: 78 %
> 2021-04-29 11:46:39,379: Installing python-gtk-2.24.0-8.27.x86_64: 89 %
> 2021-04-29 11:46:39,379: Installing python-gtk-2.24.0-8.27.x86_64: 100 %
> 2021-04-29 11:46:39,379: Installed python-gtk-2.24.0-8.27.x86_64
> 2021-04-29 11:46:39,379: Installed python-gtk-2.24.0-8.27.x86_64
> 2021-04-29 11:46:39,380: Done
> 2021-04-29 11:46:39,380: Creating zypper lock...
> 2021-04-29 11:46:39,380: Locked zypper


In this case the installation succeeded but zypper failed to refresh all repositories, exit code 106. It would be nice to see this code in the log when trying to find out what went wrong.
Comment 1 Frida Flodin cendio 2021-04-29 14:06:22 CEST
Looking more into this, in the zypper manual [1] they state that "[...] Codes below 100 denote an error, codes above 100 provide a specific information [...]"

Maybe we should not consider codes above 100 as failure. As of bug 4877 we now log all messages so the information about the error should be in the log, but in this case some 50 lines before the shut down. 

[1] https://en.opensuse.org/SDB:Zypper_manual_(plain)

Note You need to log in before you can comment on or make changes to this bug.