Bug 1009642

Summary: pkcon returns incorrect status for various commands
Product: Red Hat Enterprise Linux 6 Reporter: smatula
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 12:04:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description smatula 2013-09-18 19:05:38 UTC
Description of problem: pkcon fails to return correct status for various failures. Status of 0 is returned for the following (0 should be for success - failures should return a value.

1. when declining to proceed when there are dependencies get "Fatal error: user declined simulation" status 0 returned expect 5:
    pkcon install 
    pkcon remove

2. when giving invalid_repo to repo-enable or repo-disable get "The transaction failed: repo-not-found, Error getting repository data for invalid_repo, repository not found" Status of 0 returned expect 1
    pkcon repo-enable invalid_repo
    pkcon repo-disable invalid_repo

3. down load to existing file - No error is given. Status 0 is given and download successful. Expect Error indicating file exists with non 0 status or prompt if user wants to overwrite.
    pkcon download exiting-file pkg

4. Performing install-local of pkg where dependencies on repos are unavailable get error "  Fatal error: could not do simulate: 1:xchat-2.8.8-1.el6.x86_64 requires libsexy.so.2()(64bit)
1:xchat-2.8.8-1.el6.x86_64 requires libntlm.so.0()(64bit)" Status 0 Expect 1  

5. Install non-existing package get "Command failed: This tool could not find any available package: could not find unavailable_package" Status 1 but expected 4.
   pkcon intall package-unavailable

Version-Release number of selected component (if applicable):
PackageKit-0.5.8-21.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. See description

Actual results:
 Error shown but status of 0 returned. 

Expected results:
 Non 0 error status returned.

Additional info:

Comment 1 smatula 2013-10-08 20:30:50 UTC
More Scenarios of failures but status of 0 is returned.

1. pkcon refresh, install, download or update when network down returns status of 0. Error is returned.

2. pkcon search where search input to long returns correct error of "Fatal error: The search string length is too large" But status 0 returned 

3. pkcon install-local of invalid rpm. Error returned Fatal error: could not do simulate: /mnt/tests/desktop/rhel-6/PackageKit/data/invalid.rpm does not appear to be a valid package. Status returned 0

Comment 5 Jan Kurik 2017-12-06 12:04:37 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/