RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 848518 - wrong exit codes
Summary: wrong exit codes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: PackageKit
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: beta
: 7.0
Assignee: Richard Hughes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 19:43 UTC by Vladimir Benes
Modified: 2014-06-13 11:49 UTC (History)
4 users (show)

Fixed In Version: PackageKit-0.8.6-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:49:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vladimir Benes 2012-08-15 19:43:09 UTC
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:

    pkcon --non_existing_option

    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):
PackageKit-0.7.4-5.el7.x86_64

Comment 2 Vladimir Benes 2012-08-16 13:38:23 UTC
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 $?
0

Comment 3 Vladimir Benes 2012-08-16 13:50:48 UTC
and one more:
when installing with no network after a download error there is 0 returned.

Comment 4 Vitezslav Humpa 2012-08-21 11:02:10 UTC
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.

Comment 5 Richard Hughes 2012-11-29 11:32:08 UTC
I've fixed *loads* of these in the last release, can you please retest with PackageKit-0.8.6-1.el7 -- thanks!

Comment 6 Matthias Clasen 2013-01-17 21:07:21 UTC
moving to modified, then

Comment 7 smatula 2013-11-21 14:57:43 UTC
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.

Comment 8 Ludek Smid 2014-06-13 11:49:06 UTC
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.


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