Summary: | discover 'update all' shows no error Msgs when apt preinstall step fails | ||
---|---|---|---|
Product: | [Applications] Discover | Reporter: | Achim Bohnet <ach> |
Component: | PackageKit | Assignee: | Aleix Pol <aleixpol> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version First Reported In: | 5.13.5 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Achim Bohnet
2018-06-27 09:38:24 UTC
> Expected: discover shows the user the error happen when apt complains loudly
...Preferably in a must-acknowledge-before-moving-on modal pop-up instead of an inline notification, which will disappear before people have read it and figured out what to do.
Would it be possible to give me a way to reproduce this is issue? It will be easier to come up with a fix this way. On a debian based system: # cat >/etc/apt/apt.conf.d/00-fail-on-preload <<EOT #DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; #DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; DPkg::Pre-Invoke { "false"; }; DPkg::Post-Invoke { "false"; }; EOT check that apt fails. E.g. with pkg plasma-desktop # apt install --reinstall plasma-desktop Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded. Need to get 1.792 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.neon.kde.org/user xenial/main amd64 plasma-desktop amd64 4:5.13.2-0neon+16.04+xenial+build97 [1.792 kB] Fetched 1.792 kB in 0s (51,8 MB/s) E: Problem executing scripts DPkg::Pre-Invoke 'false' E: Sub-process returned an error code # echo $? 100 When apt return as in this case exit code of 100. Try to use discover to upgrade/install .debs. Nothing works and one sees no error msg. Hope this helps, Achim On a debian based system: # cat >/etc/apt/apt.conf.d/00-fail-on-preload <<EOT #DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; #DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; DPkg::Pre-Invoke { "false"; }; DPkg::Post-Invoke { "false"; }; EOT check that apt fails. E.g. with pkg plasma-desktop # apt install --reinstall plasma-desktop Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded. Need to get 1.792 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.neon.kde.org/user xenial/main amd64 plasma-desktop amd64 4:5.13.2-0neon+16.04+xenial+build97 [1.792 kB] Fetched 1.792 kB in 0s (51,8 MB/s) E: Problem executing scripts DPkg::Pre-Invoke 'false' E: Sub-process returned an error code # echo $? 100 When apt return as in this case exit code of 100. Try to use discover to upgrade/install .debs. Nothing works and one sees no error msg. Hope this helps, Achim with 5.13.5: to reproduce: # cat >/etc/apt/apt.conf.d/00-fail-on-preload <<EOT DPkg::Pre-Invoke { "false"; }; DPkg::Post-Invoke { "false"; }; EOT # apt upgrade -> fails and discover 'Update all' shows no error message. Looks like nothing happens. Hope this helps, Achim Very good and accurate bug report, thank you very much Achim! I confirmed it and reported it upstream: https://github.com/hughsie/PackageKit/issues/281 |