diff -pruN 2.5.0/apt-file 2.5.0ubuntu1/apt-file
--- 2.5.0/apt-file	2011-07-24 15:51:39.000000000 +0000
+++ 2.5.0ubuntu1/apt-file	2011-08-05 22:23:36.000000000 +0000
@@ -178,7 +178,7 @@ sub parse_sources_list($) {
             my $fetch = [];
 
             foreach (@extra) {
-                push @$fetch, m{(.*?)/(?:.*)}o ? "$dist/$1" : "$dist/$_";
+                push @$fetch, m{(.*?)/(?:.*)}o ? "$dist/$1" : "$dist";
             }
 
             foreach ( @{ ( unique $fetch) } ) {
diff -pruN 2.5.0/debian/changelog 2.5.0ubuntu1/debian/changelog
--- 2.5.0/debian/changelog	2011-07-24 16:07:25.000000000 +0000
+++ 2.5.0ubuntu1/debian/changelog	2011-08-05 22:24:34.000000000 +0000
@@ -1,3 +1,9 @@
+apt-file (2.5.0ubuntu1) oneiric; urgency=low
+
+  * Fix location of Contents files for Ubuntu. (LP: #817622)
+
+ -- Jean-Louis Dupond <jean-louis@dupond.be>  Sat, 06 Aug 2011 00:16:02 +0200
+
 apt-file (2.5.0) unstable; urgency=low
 
   [ Paul Wise ]
diff -pruN 2.5.0/debian/control 2.5.0ubuntu1/debian/control
--- 2.5.0/debian/control	2011-07-24 16:03:58.000000000 +0000
+++ 2.5.0ubuntu1/debian/control	2011-08-05 22:23:36.000000000 +0000
@@ -1,7 +1,8 @@
 Source: apt-file
 Section: admin
 Priority: optional
-Maintainer: Stefan Fritsch <sf@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Stefan Fritsch <sf@debian.org>
 Uploaders: Thijs Kinkhorst <thijs@debian.org>, Enrico Zini <enrico@debian.org>
 Build-Depends: debhelper (>= 8), docbook, docbook-utils, libconfig-file-perl, libapt-pkg-perl, liblist-moreutils-perl, libregexp-assemble-perl, libfile-temp-perl
 Standards-Version: 3.9.2
diff -pruN 2.5.0/tests-apt-file/cache/site1_debian_dists_lenny_Contents-fooarch 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_lenny_Contents-fooarch
--- 2.5.0/tests-apt-file/cache/site1_debian_dists_lenny_Contents-fooarch	1970-01-01 00:00:00.000000000 +0000
+++ 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_lenny_Contents-fooarch	2011-08-05 22:23:36.000000000 +0000
@@ -0,0 +1,38 @@
+This file maps each file available in the Debian GNU/Linux system to
+the package from which it originates.  It includes packages from the
+DIST distribution for the ARCH architecture.
+
+You can use this list to determine which package contains a specific
+file, or whether or not a specific file is available.  The list is
+updated weekly, each architecture on a different day.
+
+When a file is contained in more than one package, all packages are
+listed.  When a directory is contained in more than one package, only
+the first is listed.
+
+The best way to search quickly for a file is with the Unix `grep'
+utility, as in `grep <regular expression> CONTENTS':
+
+ $ grep nose Contents
+ etc/nosendfile                                          net/sendfile
+ usr/X11R6/bin/noseguy                                   x11/xscreensaver
+ usr/X11R6/man/man1/noseguy.1x.gz                        x11/xscreensaver
+ usr/doc/examples/ucbmpeg/mpeg_encode/nosearch.param     graphics/ucbmpeg
+ usr/lib/cfengine/bin/noseyparker                        admin/cfengine
+
+This list contains files in all packages, even though not all of the
+packages are installed on an actual system at once.  If you want to
+find out which packages on an installed Debian system provide a
+particular file, you can use `dpkg --search <filename>':
+
+ $ dpkg --search /usr/bin/dselect
+ dpkg: /usr/bin/dselect
+
+
+FILE                                                    LOCATION
+bin/afio						utils/afio
+bin/bash						shells/bash
+bin/bash-minimal					shells/bash-minimal
+bin/bash-static						shells/bash-static
+usr/lib/uml/modules/2.6.24/kernel/fs/fat/fat.ko		misc/user-mode-linux
+usr/lib/uml/modules/2.6.24/kernel/fs/vfat/vfat.ko	misc/user-mode-linux
diff -pruN 2.5.0/tests-apt-file/cache/site1_debian_dists_lenny_main_Contents-fooarch 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_lenny_main_Contents-fooarch
--- 2.5.0/tests-apt-file/cache/site1_debian_dists_lenny_main_Contents-fooarch	2011-07-24 15:51:39.000000000 +0000
+++ 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_lenny_main_Contents-fooarch	1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-This file maps each file available in the Debian GNU/Linux system to
-the package from which it originates.  It includes packages from the
-DIST distribution for the ARCH architecture.
-
-You can use this list to determine which package contains a specific
-file, or whether or not a specific file is available.  The list is
-updated weekly, each architecture on a different day.
-
-When a file is contained in more than one package, all packages are
-listed.  When a directory is contained in more than one package, only
-the first is listed.
-
-The best way to search quickly for a file is with the Unix `grep'
-utility, as in `grep <regular expression> CONTENTS':
-
- $ grep nose Contents
- etc/nosendfile                                          net/sendfile
- usr/X11R6/bin/noseguy                                   x11/xscreensaver
- usr/X11R6/man/man1/noseguy.1x.gz                        x11/xscreensaver
- usr/doc/examples/ucbmpeg/mpeg_encode/nosearch.param     graphics/ucbmpeg
- usr/lib/cfengine/bin/noseyparker                        admin/cfengine
-
-This list contains files in all packages, even though not all of the
-packages are installed on an actual system at once.  If you want to
-find out which packages on an installed Debian system provide a
-particular file, you can use `dpkg --search <filename>':
-
- $ dpkg --search /usr/bin/dselect
- dpkg: /usr/bin/dselect
-
-
-FILE                                                    LOCATION
-bin/afio						utils/afio
-bin/bash						shells/bash
-bin/bash-minimal					shells/bash-minimal
-bin/bash-static						shells/bash-static
-usr/lib/uml/modules/2.6.24/kernel/fs/fat/fat.ko		misc/user-mode-linux
-usr/lib/uml/modules/2.6.24/kernel/fs/vfat/vfat.ko	misc/user-mode-linux
diff -pruN 2.5.0/tests-apt-file/cache/site1_debian_dists_sid_Contents-fooarch 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_sid_Contents-fooarch
--- 2.5.0/tests-apt-file/cache/site1_debian_dists_sid_Contents-fooarch	1970-01-01 00:00:00.000000000 +0000
+++ 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_sid_Contents-fooarch	2011-08-05 22:23:36.000000000 +0000
@@ -0,0 +1,42 @@
+This file maps each file available in the Debian GNU/Linux system to
+the package from which it originates.  It includes packages from the
+DIST distribution for the ARCH architecture.
+
+You can use this list to determine which package contains a specific
+file, or whether or not a specific file is available.  The list is
+updated weekly, each architecture on a different day.
+
+When a file is contained in more than one package, all packages are
+listed.  When a directory is contained in more than one package, only
+the first is listed.
+
+The best way to search quickly for a file is with the Unix `grep'
+utility, as in `grep <regular expression> CONTENTS':
+
+ $ grep nose Contents
+ etc/nosendfile                                          net/sendfile
+ usr/X11R6/bin/noseguy                                   x11/xscreensaver
+ usr/X11R6/man/man1/noseguy.1x.gz                        x11/xscreensaver
+ usr/doc/examples/ucbmpeg/mpeg_encode/nosearch.param     graphics/ucbmpeg
+ usr/lib/cfengine/bin/noseyparker                        admin/cfengine
+
+This list contains files in all packages, even though not all of the
+packages are installed on an actual system at once.  If you want to
+find out which packages on an installed Debian system provide a
+particular file, you can use `dpkg --search <filename>':
+
+ $ dpkg --search /usr/bin/dselect
+ dpkg: /usr/bin/dselect
+
+
+FILE                                                    LOCATION
+bin/afio						utils/afio
+bin/ash							shells/ash
+bin/bash						shells/bash
+bin/bash-minimal					shells/bash-minimal
+bin/bash-static						shells/bash-static
+usr/debug/bin/bash					shells/bash-debug
+usr/lib/uml/modules/2.6.24/kernel/fs/fat/fat.ko		misc/user-mode-linux
+usr/lib/uml/modules/2.6.24/kernel/fs/vfat/vfat.ko	misc/user-mode-linux
+usr/lib/perl5/Template.pm				perl/libtemplate-perl
+usr/bin/mp3gain						audio/mp3gain
diff -pruN 2.5.0/tests-apt-file/cache/site1_debian_dists_sid_main_Contents-fooarch 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_sid_main_Contents-fooarch
--- 2.5.0/tests-apt-file/cache/site1_debian_dists_sid_main_Contents-fooarch	2011-07-24 15:51:39.000000000 +0000
+++ 2.5.0ubuntu1/tests-apt-file/cache/site1_debian_dists_sid_main_Contents-fooarch	1970-01-01 00:00:00.000000000 +0000
@@ -1,42 +0,0 @@
-This file maps each file available in the Debian GNU/Linux system to
-the package from which it originates.  It includes packages from the
-DIST distribution for the ARCH architecture.
-
-You can use this list to determine which package contains a specific
-file, or whether or not a specific file is available.  The list is
-updated weekly, each architecture on a different day.
-
-When a file is contained in more than one package, all packages are
-listed.  When a directory is contained in more than one package, only
-the first is listed.
-
-The best way to search quickly for a file is with the Unix `grep'
-utility, as in `grep <regular expression> CONTENTS':
-
- $ grep nose Contents
- etc/nosendfile                                          net/sendfile
- usr/X11R6/bin/noseguy                                   x11/xscreensaver
- usr/X11R6/man/man1/noseguy.1x.gz                        x11/xscreensaver
- usr/doc/examples/ucbmpeg/mpeg_encode/nosearch.param     graphics/ucbmpeg
- usr/lib/cfengine/bin/noseyparker                        admin/cfengine
-
-This list contains files in all packages, even though not all of the
-packages are installed on an actual system at once.  If you want to
-find out which packages on an installed Debian system provide a
-particular file, you can use `dpkg --search <filename>':
-
- $ dpkg --search /usr/bin/dselect
- dpkg: /usr/bin/dselect
-
-
-FILE                                                    LOCATION
-bin/afio						utils/afio
-bin/ash							shells/ash
-bin/bash						shells/bash
-bin/bash-minimal					shells/bash-minimal
-bin/bash-static						shells/bash-static
-usr/debug/bin/bash					shells/bash-debug
-usr/lib/uml/modules/2.6.24/kernel/fs/fat/fat.ko		misc/user-mode-linux
-usr/lib/uml/modules/2.6.24/kernel/fs/vfat/vfat.ko	misc/user-mode-linux
-usr/lib/perl5/Template.pm				perl/libtemplate-perl
-usr/bin/mp3gain						audio/mp3gain

