]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
merged from the debian-sid branch
[apt.git] / apt-pkg / deb / dpkgpm.cc
index d8c38427f57e8d9137e928b89dd616e4abd65edb..b41b38bd54ed7b9fca9b5df222347c5a89f1e8d5 100644 (file)
@@ -1123,6 +1123,29 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
         fclose(log);
       }
    }
+
+   // log the ordering 
+   const char *ops_str[] = {"Install", "Configure","Remove","Purge"};
+   fprintf(report, "AptOrdering:\n");
+   for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+      fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]);
+
+   // attach dmesg log (to learn about segfaults)
+   if (FileExists("/bin/dmesg"))
+   {
+      FILE *log = NULL;
+      char buf[1024];
+
+      fprintf(report, "Dmesg:\n");
+      log = popen("/bin/dmesg","r");
+      if(log != NULL)
+      {
+        while( fgets(buf, sizeof(buf), log) != NULL)
+           fprintf(report, " %s", buf);
+        fclose(log);
+      }
+   }
    fclose(report);
+
 }
                                                                        /*}}}*/