diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-04-24 19:53:19 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-04-24 19:53:19 +0200 |
commit | 76dbdfc7f02096758f63bcb6d306b54d5a2d0d02 (patch) | |
tree | 0c9bc6a3e480e952a8817fc8165e8d81fadc5e45 /apt-pkg/deb | |
parent | 3a41eec0084219731dc48d5cf7ecd803ea6d5483 (diff) |
* fix problematic use of tolower() when calculating the version
hash by using locale independant tolower_ascii() function.
Thanks to M. Vefa Bicakci (LP: #80248)
* build fixes for g++-4.4
* include dmesg output in apport package failures
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 2 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 896d4d6d8..55ba1f8c4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -213,7 +213,7 @@ unsigned short debListParser::VersionHash() for (; Start != End; Start++) { if (isspace(*Start) == 0) - *I++ = tolower(*Start); + *I++ = tolower_ascii(*Start); if (*Start == '<' && Start[1] != '<' && Start[1] != '=') *I++ = '='; if (*Start == '>' && Start[1] != '>' && Start[1] != '=') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index d8c38427f..f57bff32c 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1123,6 +1123,23 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) fclose(log); } } + + // 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); + } /*}}}*/ |