// ---------------------------------------------------------------------
 /* This is to return the name of the package this section describes */
 string debListParser::Package() {
-   string const Result = Section.FindS("Package");
+   string Result = Section.FindS("Package");
+
+   // Normalize mixed case package names to lower case, like dpkg does
+   // See Bug#807012 for details
+   std::transform(Result.begin(), Result.end(), Result.begin(), tolower_ascii);
+
    if(unlikely(Result.empty() == true))
       _error->Error("Encountered a section with no Package: header");
    return Result;
 
 // RecordParserBase::Name - Return the package name                    /*{{{*/
 string debRecordParserBase::Name()
 {
-   return Section.FindS("Package");
+   string Result = Section.FindS("Package");
+
+   // Normalize mixed case package names to lower case, like dpkg does
+   // See Bug#807012 for details
+   std::transform(Result.begin(), Result.end(), Result.begin(), tolower_ascii);
+
+   return Result;
 }
                                                                        /*}}}*/
 // RecordParserBase::Homepage - Return the package homepage            /*{{{*/
 
--- /dev/null
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+TMPDIR=$(readlink -f .)
+
+insertinstalledpackage 'worldofgoo' 'all' '1'
+insertpackage 'unstable' 'WorldOfGoo' 'all' '1'
+
+setupaptarchive
+
+testsuccessequal "worldofgoo:
+  Installed: 1
+  Candidate: 1
+  Version table:
+ *** 1 500
+        500 file:${TMPDIR}/aptarchive unstable/main all Packages
+        100 ${TMPDIR}/rootdir/var/lib/dpkg/status" \
+        aptcache policy worldofgoo