Red Hat Bugzilla – Bug 848518
wrong exit codes
Last modified: 2014-06-13 07:49:06 EDT
Description of problem:
I've found a lot of wrong exit codes. I've decided to file them all into one place as it looks like some of those can be for discussion
exit code 0:
download errors (disabled network)
failed to parse error (pkcon --cache-age=sda or so)
missing argument for cache-age returns 0
already installed package error when installing locally returns 0 (should be 5)
pkcon local-install (on invalid package - no rpm)
fatal erorr: user declined simulation (when declined dependencies)
pkcon install unavailable has 1
fatal error user declined interaction (installing unsigned package declined)
fatat error: no transaction to process (pkcon update kernel when updated)
fatal error: nothing to do (pkcon update on updated system)
fatal error: cannot refresh cache when offline (pkcon refresh when offline)
pkcon get-depends setup (no more depends .. shouldn't it be 5 instead of 0?)
pkcon get-requires mc (no requires returned still 0?)
Fatal error: Trying to remove "yum", which is protected (pkcon get-requires glibc)
Fatal error: Error getting repository data for alpha23, repository not found (enable non existing repo)
ditto with disable invalid repo)
no requires found by pkcon get-requires mc (is 0 shouldn't be 5?)
pkcon repo enable/disable of enabled/disabled repo shoudl return 5 not 0
Version-Release number of selected component (if applicable):
I've got one more :
when dependencies are not available there is 0 as well
Resolving dependencies [=========================]
Fatal error: gnome-boxes-3.5.5-1.el7.x86_64 requires libspice-client-glib-2.0.so.8(SPICEGTK_1)(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libvirt-gobject-1.0.so.0(LIBVIRT_GOBJECT_0.0.9)(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libspice-client-gtk-3.0.so.4(SPICEGTK_1)(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libvirt-gconfig-1.0.so.0(LIBVIRT_GCONFIG_0.1.0)(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libspice-client-glib-2.0.so.8()(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libspice-client-gtk-3.0.so.4()(64bit)
gnome-boxes-3.5.5-1.el7.x86_64 requires libvirt-gconfig-1.0.so.0(LIBVIRT_GCONFIG_0.0.9)(64bit)
[root@rhle7alpha2 repo]# echo $?
and one more:
when installing with no network after a download error there is 0 returned.
I've also found that:
Fatal error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code11: The search string length is too large
exits with value of 0.
I've fixed *loads* of these in the last release, can you please retest with PackageKit-0.8.6-1.el7 -- thanks!
moving to modified, then
Fix Verified with Build RHEL-7.0-20131115.2 x86_64 PackageKit-0.8.9-8.el7.
All negative error scenarios that produce error status other 5 pass and now produce a non 0 error status.
Four scenarios still produce error status of 0 where status of 5 is expected.
Error Status 5 is 'Nothing useful was done.' These are the following:
pkcon repo-enable a already enabled repo.
pkcon repo-disable a already disabled repo.
pkcon get-depends setup (no depends - no results)
pkcon get-requires mc (no requires - no results)
Opening new bug for this case and the four scenarios.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.