#807517 apt-ftparchive: multiarch pool results in identical Packages for main/contrib/non-free

Package:
apt-utils
Source:
apt
Description:
package management related utility programs
Submitter:
Martin-Éric Racine
Date:
2015-12-09 23:06:10 UTC
Severity:
normal
#807517#5
Date:
2015-12-09 22:39:22 UTC
From:
To:
I have a personal repository with the following structure:

8X-----
$ tree public_html/debian/
public_html/debian/
├── dists
│   └── testing
│       ├── contrib
│       │   ├── binary-amd64
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── binary-i386
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── Contents-amd64
│       │   ├── Contents-amd64.gz
│       │   ├── Contents-i386
│       │   ├── Contents-i386.gz
│       │   └── source
│       │       ├── Sources
│       │       └── Sources.gz
│       ├── InRelease
│       ├── main
│       │   ├── binary-amd64
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── binary-i386
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── Contents-amd64
│       │   ├── Contents-amd64.gz
│       │   ├── Contents-i386
│       │   ├── Contents-i386.gz
│       │   └── source
│       │       ├── Sources
│       │       └── Sources.gz
│       ├── non-free
│       │   ├── binary-amd64
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── binary-i386
│       │   │   ├── Packages
│       │   │   └── Packages.gz
│       │   ├── Contents-amd64
│       │   ├── Contents-amd64.gz
│       │   ├── Contents-i386
│       │   ├── Contents-i386.gz
│       │   └── source
│       │       ├── Sources
│       │       └── Sources.gz
│       ├── Release
│       └── Release.gpg
└── pool
    ├── contrib
    │   └── f
    │       └── funkyware-meta
    │           ├── funkyware-common_801_all.deb
    │           ├── funkyware-desktop_801_all.deb
    │           ├── funkyware-meta_801.dsc
    │           ├── funkyware-meta_801.tar.xz
    │           └── funkyware-office_801_all.deb
    ├── main
    │   ├── c
    │   │   └── cups-pdf
    │   │       ├── cups-pdf_2.6.1-20.debian.tar.xz
    │   │       ├── cups-pdf_2.6.1-20.dsc
    │   │       └── cups-pdf_2.6.1.orig.tar.gz
    │   ├── u
    │   │   └── upgrade-system
    │   │       ├── upgrade-system_1.7.3.0_all.deb
    │   │       ├── upgrade-system_1.7.3.0.dsc
    │   │       └── upgrade-system_1.7.3.0.tar.xz
    │   └── x
    │       └── xserver-xorg-video-geode
    │           ├── xserver-xorg-video-geode_2.11.17-5.debian.tar.xz
    │           ├── xserver-xorg-video-geode_2.11.17-5.dsc
    │           ├── xserver-xorg-video-geode_2.11.17-5_i386.deb
    │           ├── xserver-xorg-video-geode_2.11.17.orig.tar.gz
    │           └── xserver-xorg-video-geode-dbg_2.11.17-5_i386.deb
    └── non-free
        └── s
            └── spotify-client
                └── spotify-client_1:0.9.4.183.g644e24e.428-2_i386.deb

28 directories, 51 files
8X-----

The distribution files are generated with this:

8X-----
// Release variables taken from /etc/apt/apt.conf.d/99funkyware:
//
// FTPArchive {
// 	Release {
//		Description "Development packages by Martin-Eric Racine";
//		Origin "Funkyware";
//		Label "Funkyware-Security";
//		Architectures "amd64 i386 source";
//		Suite "testing";
//		Components "contrib main non-free";
// 	};
// };
//
// RELEASE HOWTO (Bourne shell script in ~/bin/):
//
// apt-ftparchive -q=2    clean $HTMLDIR/apt-ftparchive.conf
// apt-ftparchive -q=2 generate $HTMLDIR/apt-ftparchive.conf
// apt-ftparchive -q=2  release $HTMLDIR/debian/dists/testing > $HTMLDIR/debian/dists/testing/Release
// gpg -a -s --detach-sign -o $HTMLDIR/debian/dists/testing/Release.gpg $HTMLDIR/debian/dists/testing/Release
// gpg -a -s --clearsign   -o $HTMLDIR/debian/dists/testing/InRelease   $HTMLDIR/debian/dists/testing/Release
//
//  Input: {ArchiveDir}/pool/{contrib|main|non-free}/{letter}/{package}/{bin|src}
// Output: {ArchiveDir}/dists/testing/{contrib|main|non-free}/{binary-{arch}|source}/{Packages|Sources}
//
Dir {
	ArchiveDir "/home/perkelix/public_html/debian";
	CacheDir "/tmp";
};
TreeDefault {
	Directory "pool";
	SrcDirectory "pool";
};
Tree "dists/testing" {
	Sections "main contrib non-free";
	Architectures "amd64 i386 source";
};
8X-----

Yet, for some reason, only architectures are correctly separated (e.g. the above pool only shows the arch:all packages to amd64 hosts, while i386 hosts see everything, as expected). Meanwhile, the Contents/Packages/Sources come out as identical for all of main/contrib/non-free. I would have expected the Contents/Packages/Sources in each component to only show what was found from the correcponding pool sub-section.

Have I misconfigured something or is this the expected behavior?