X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/5d053270a275d1c825c793151f50bf3b680f55ec..c9034b42ab8da606fc0214dbad54025fc4b586af:/apt-pkg/deb/dpkgpm.cc diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 90ae413f4..e1e26e903 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -393,14 +393,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) { @@ -572,17 +572,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") }, - {"half-configured", N_("Configuring %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} @@ -841,7 +844,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) tv.tv_sec = 1; tv.tv_usec = 0; select_ret = select(max(master, _dpkgin)+1, &rfds, NULL, NULL, &tv); - if (select_ret == 0) + if (select_ret == 0) continue; else if (select_ret < 0 && errno == EINTR) continue; @@ -850,7 +853,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) perror("select() returned error"); continue; } - + if(master >= 0 && FD_ISSET(master, &rfds)) DoTerminalPty(master); if(master >= 0 && FD_ISSET(0, &rfds))