From 5e457a9336967e4851e094a84f9f94f4141ee393 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Jun 2007 16:14:08 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - apport integration added, this means that a apport report is written on dpkg failures --- apt-pkg/deb/dpkgpm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/deb/dpkgpm.h') diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 0b181dc43..1a1fdc191 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -23,6 +23,7 @@ using std::vector; class pkgDPkgPM : public pkgPackageManager { protected: + int pkgFailures; // used for progress reporting struct DpkgState @@ -48,6 +49,9 @@ class pkgDPkgPM : public pkgPackageManager bool RunScriptsWithPkgs(const char *Cnf); bool SendV2Pkgs(FILE *F); + // apport integration + void WriteApportReport(const char *pkgpath, const char *errormsg); + // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,string File); virtual bool Configure(PkgIterator Pkg); -- cgit v1.2.3 From 8ecd1fedeace0e22f96259e250094006c673d065 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 3 Aug 2007 18:43:46 +0200 Subject: - when writting apport reports, attach the dpkg terminal log too --- apt-pkg/deb/dpkgpm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb/dpkgpm.h') diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index f8e9e44a8..222add98f 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -26,7 +26,8 @@ class pkgDPkgPM : public pkgPackageManager // the buffer we use for the dpkg status-fd reading char dpkgbuf[1024]; int dpkgbuf_pos; - + FILE *term_out; + protected: int pkgFailures; @@ -71,7 +72,7 @@ class pkgDPkgPM : public pkgPackageManager // input processing void DoStdin(int master); - void DoTerminalPty(int master, FILE *out); + void DoTerminalPty(int master); void DoDpkgStatusFd(int statusfd, int OutStatusFd); void ProcessDpkgStatusLine(int OutStatusFd, char *line); -- cgit v1.2.3 From 5d053270a275d1c825c793151f50bf3b680f55ec Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Sep 2007 15:10:55 +0200 Subject: * apt-pkg/deb/dpkgpm.{cc,h}: - fix bug in dpkg log writing when a signal is caught during select() (LP: #134858) - write end marker in the log as well --- apt-pkg/deb/dpkgpm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/deb/dpkgpm.h') diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index debde36a3..e5f197405 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -70,6 +70,10 @@ class pkgDPkgPM : public pkgPackageManager // apport integration void WriteApportReport(const char *pkgpath, const char *errormsg); + // dpkg log + bool OpenLog(); + bool CloseLog(); + // input processing void DoStdin(int master); void DoTerminalPty(int master); -- cgit v1.2.3 From a29b2c0b9c4e7b1c36433c9c6dd5d24697f9c4b6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 26 Jan 2010 11:57:29 +0100 Subject: Change history branch so that it does not break the apt ABI for the pkgPackageManager interface (can be reverted on the next ABI break) --- apt-pkg/deb/dpkgpm.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apt-pkg/deb/dpkgpm.h') diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index ce3e20f2e..160486bf9 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -29,8 +29,6 @@ class pkgDPkgPM : public pkgPackageManager char dpkgbuf[1024]; int dpkgbuf_pos; FILE *term_out; - FILE *history_out; - string dpkg_error; protected: int pkgFailures; @@ -70,7 +68,7 @@ class pkgDPkgPM : public pkgPackageManager // Helpers bool RunScriptsWithPkgs(const char *Cnf); bool SendV2Pkgs(FILE *F); - void WriteHistoryTag(string tag, string value); + void WriteHistoryTag(FILE* history_out, string tag, string value); // apport integration void WriteApportReport(const char *pkgpath, const char *errormsg); -- cgit v1.2.3