--- 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);
}
}