[Bug 1033631] [NEW] gdebi returns success on dpkg error

Amit Uttamchandani 1033631 at bugs.launchpad.net
Mon Aug 6 19:28:47 UTC 2012


Public bug reported:

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.

** Affects: gdebi (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdebi in Ubuntu.
https://bugs.launchpad.net/bugs/1033631

Title:
  gdebi returns success on dpkg error

Status in “gdebi” package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdebi/+bug/1033631/+subscriptions




More information about the foundations-bugs mailing list