Bug 401426 - offline update error indication
Summary: offline update error indication
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-26 11:38 UTC by Harald Sitter
Modified: 2018-12-19 16:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2018-11-26 11:38:56 UTC
- PK_OFFLINE_UPDATE=1 plasma-discover 
- update
- reboot
- have error during offline update
- automatic reboot
- login

After offline updates packagekit creates a marker file which should be read and handled by the UI after the update.

Specifically upon error the user needs to get notified about the problem so they may file a bug or repair their system. Possibly even with a link to attempt auto-repair (does discover even support repair? [e.g. pkcon repair]).
It'd probably be best to say nothing on successful completion, since that's the default assumption IMO.

➜ cat /var/lib/PackageKit/offline-update-competed 
[PackageKit Offline Update Results]
Success=false
ErrorCode=failed-initialization
ErrorDetails=Error while installing package: installed samba package post-installation script subprocess returned error exit status 1
Comment 1 Nate Graham 2018-11-26 17:26:55 UTC
+1 for automatically trying to do `pkcon repair`. If it succeeds, we should show a notification asking the user to try rebooting again  or something. Maybe only if `pkcon repair` fails should we fall back to showing the error and giving up.

"Error while installing package: installed samba package post-installation script subprocess returned error exit status 1" would be meaningless gibberish for Discover's target users. Frankly it's meaningless gibberish for me. I have no idea what I would do with that.
Comment 2 Harald Sitter 2018-11-27 12:31:24 UTC
Well, the expectation is to file a bug somewhere with that information from ErrorDetails, only advanced users may be able to figure out whats wrong and deal with it on their own (much like with the backtrace tab in drkonqi). It's not useless information in general, it's just powerful-when-needed information. How/if we wire that up to distro-specific bug report tools is a question that needs figuring out I guess.

Aaanyway...

To be clear: by automatic repair I still meant there needs to be a notification "your system is in a bad state, how about I try to repair it? [Yes, Repair away]".
Repair is still an action that can break stuff (more), so this still requires user approval. Also, they'll get an auth prompt via polkit, for that alone they'll need some context  :)
Comment 3 Aleix Pol 2018-12-19 16:28:26 UTC
Git commit 5487110599ca83073497793d3c6ad940ee26ce05 by Aleix Pol.
Committed on 19/12/2018 at 16:26.
Pushed by apol into branch 'master'.

pk: Allow the user to repair the system after a faulty offline update

M  +6    -0    libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp

https://commits.kde.org/discover/5487110599ca83073497793d3c6ad940ee26ce05