summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:58 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:58 +0000
commitf956efb4abdaea622f4d609613d73ffbb2c97188 (patch)
tree90789464ad650f5ebb51e2394ae6c0df0ed765d5 /apt-pkg/deb
parent87b1123049ee15e4a03f5de8c714458c077388e4 (diff)
Better dpkg error reporting
Author: jgg Date: 1999-03-05 19:36:49 GMT Better dpkg error reporting
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 3969aef22..f8c59d844 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: dpkgpm.cc,v 1.7 1999/01/31 08:55:53 jgg Exp $
+// $Id: dpkgpm.cc,v 1.8 1999/03/05 19:36:49 jgg Exp $
/* ######################################################################
DPKG Package Manager - Provide an interface to dpkg
@@ -310,7 +310,13 @@ bool pkgDPkgPM::Go()
if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
{
RunScripts("DPkg::Post-Invoke");
- return _error->Error("Sub-process returned an error code");
+ if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV)
+ return _error->Error("Sub-process recieved a segmentation fault.");
+
+ if (WIFEXITED(Status) != 0)
+ return _error->Error("Sub-process returned an error code (%u)",WEXITSTATUS(Status));
+
+ return _error->Error("Sub-process exited unexpectedly");
}
}