Ubuntu Pastebin

Paste from cyphermox at Fri, 5 Aug 2016 16:52:25 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- a/apt-pkg/deb/dpkgpm.cc	2016-08-05 12:47:04.000000000 -0400
+++ b/apt-pkg/deb/dpkgpm.cc	2016-08-05 12:47:04.000000000 -0400
@@ -1822,6 +1783,7 @@
 
    // attach terminal log it if we have it
    string logfile_name = _config->FindFile("Dir::Log::Terminal");
+   string target_logfile_name = "/target" + logfile_name;
    if (!logfile_name.empty())
    {
       FILE *log = NULL;
@@ -1836,10 +1798,21 @@
          fprintf(report, " \n");
 	 fclose(log);
       }
+      log = fopen(target_logfile_name.c_str(),"r");
+      if(log != NULL)
+      {
+         fprintf(report, "ChrootDpkgTerminalLog:\n");
+	 char buf[1024];
+	 while( fgets(buf, sizeof(buf), log) != NULL)
+	    fprintf(report, " %s", buf);
+         fprintf(report, " \n");
+	 fclose(log);
+      }
    }
 
    // attach history log it if we have it
    string histfile_name = _config->FindFile("Dir::Log::History");
+   string target_histfile_name = "/target" + histfile_name;
    if (!histfile_name.empty())
    {
       fprintf(report, "DpkgHistoryLog:\n");
@@ -1849,6 +1822,15 @@
 	 char buf[1024];
 	 while( fgets(buf, sizeof(buf), log) != NULL)
 	    fprintf(report, " %s", buf);
+	 fclose(log);
+      }
+      log = fopen(target_histfile_name.c_str(),"r");
+      if(log != NULL)
+      {
+         fprintf(report, "ChrootDpkgHistoryLog:\n");
+	 char buf[1024];
+	 while( fgets(buf, sizeof(buf), log) != NULL)
+	    fprintf(report, " %s", buf);
 	 fclose(log);
       }
    }
Download as text