gdebi returns success on dpkg error

Bug #1033631 reported by Amit Uttamchandani
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdebi (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I noticed if the package errors out (for example, if the postinst script fails), gdebi still returns a '0' indicating a successfull install. It should return a '1' indicating the package failed to install.

The use case is when calling gdebi from a C program that looks for the return status as indication of success or failure. In the case described, dpkg returns a 1 on error while gdebi returns 0.

An easy way to reproduce is to modify an existing debian postinst to exit 1 instead of exit 0 (usually last line of postinst script). Run it by dpkg and gdebi and compare the resulting return status.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :
Changed in gdebi (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdebi - 0.8.5ubuntu1

---------------
gdebi (0.8.5ubuntu1) quantal; urgency=low

  * gdebi, GDebi/GDebiCli.py:
    - Return dpkg error code (LP: #1033631).
  * gdebi-gtk, gdebi-kde:
    - Convert help options with unicode (LP: #976253).
  * GDebi/GDebi.py:
    - Port to new GIO API (LP: #858700).
  * GDebi/GDebi.py, data/gdebi.ui:
    - Mark menu and labels as sensitive at startup (LP: #1000014).
  * GDebi/GDebiCli.py, GDebi/GDebiCommon.py:
    - Also handle ValueError exception (LP: #980457).
  * GDebi/GDebiKDE.py:
    - Fall-back on kdesu if kdesudo is not available (LP: #949869).
  * debian/control:
    - Add xz-utils to gdebi-core Suggests field (Closes: #685193).
  * po/pt.po:
    - Fix translation string which erroneously used three format string
      parameters instead of two (LP: #964895).
 -- Luca Falavigna <email address hidden> Sat, 22 Sep 2012 15:21:29 +0200

Changed in gdebi (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.