summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index f83214344..4323b5fd2 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -44,8 +44,8 @@ using namespace std;
// ---------------------------------------------------------------------
/* */
pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
- : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesDone(0),
- PackagesTotal(0), term_out(NULL)
+ : pkgPackageManager(Cache), dpkgbuf_pos(0),
+ term_out(NULL), PackagesDone(0), PackagesTotal(0)
{
}
/*}}}*/
@@ -392,14 +392,14 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
// statusfd or by rewriting the code here to deal with
// it. for now we just ignore it and not crash
TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]));
- char *pkg = list[1];
- char *action = _strstrip(list[2]);
- if( pkg == NULL || action == NULL)
+ if( list[0] == NULL || list[1] == NULL || list[2] == NULL)
{
if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
std::clog << "ignoring line: not enough ':'" << std::endl;
return;
}
+ char *pkg = list[1];
+ char *action = _strstrip(list[2]);
if(strncmp(action,"error",strlen("error")) == 0)
{
@@ -558,7 +558,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// map the dpkg states to the operations that are performed
// (this is sorted in the same way as Item::Ops)
- static const struct DpkgState DpkgStatesOpMap[][5] = {
+ static const struct DpkgState DpkgStatesOpMap[][7] = {
// Install operation
{
{"half-installed", N_("Preparing %s")},
@@ -569,12 +569,20 @@ bool pkgDPkgPM::Go(int OutStatusFd)
{
{"unpacked",N_("Preparing to configure %s") },
{"half-configured", N_("Configuring %s") },
+#if 0
+ {"triggers-awaited", N_("Processing triggers for %s") },
+ {"triggers-pending", N_("Processing triggers for %s") },
+#endif
{ "installed", N_("Installed %s")},
{NULL, NULL}
},
// Remove operation
{
{"half-configured", N_("Preparing for removal of %s")},
+#if 0
+ {"triggers-awaited", N_("Preparing for removal of %s")},
+ {"triggers-pending", N_("Preparing for removal of %s")},
+#endif
{"half-installed", N_("Removing %s")},
{"config-files", N_("Removed %s")},
{NULL, NULL}
@@ -785,7 +793,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
/* No Job Control Stop Env is a magic dpkg var that prevents it
from using sigstop */
- putenv("DPKG_NO_TSTP=yes");
+ putenv((char *)"DPKG_NO_TSTP=yes");
execvp(Args[0],(char **)Args);
cerr << "Could not exec dpkg!" << endl;
_exit(100);
@@ -843,7 +851,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
continue;
}
-
if(master >= 0 && FD_ISSET(master, &rfds))
DoTerminalPty(master);
if(master >= 0 && FD_ISSET(0, &rfds))