Bug 22819

Summary: pkcon returns incorrect exit status
Product: PackageKit Reporter: Priyank <pchoudhu>
Component: coreAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Priyank 2009-07-17 07:06:30 UTC
Overview:
pkcon returns exit status 0 even after when there is an error during installation/uninstallation/etc.

Steps to Reproduce:
On a debian system
touch /tmp/abc.deb
pkcon install /tmp/abc.deb

On a rpm system
touch /tmp/abc.rpm
pkcon install /tmp/abc.rpm

Actual Results:
Exit status is 0

Expected Results:
Exit status should be non-zero to indicate that PackageKit was not able to install the package.

Version:
PackageKit 0.3.6
OS: Ubuntu 8.10 
(But this is reproducible on most all the distributions that I tried)
Comment 1 Richard Hughes 2009-07-20 08:59:59 UTC
Fixed in:

commit 2792a1309d0a259a0d91a942adf47ca2846e8724
Author: Richard Hughes <richard@hughsie.com>
Date:   Mon Jul 20 16:56:51 2009 +0100

    Fix the exit codes for pkcon and pkmon, and document them. Fixes fd#22819

Thanks for reporting this bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.