From:
[email protected]
This is a multi-part MIME message sent by reportbug.
Package: apt-utils
Version: 0.5.27
Severity: wishlist
File: /usr/bin/apt-ftparchive
Tags: patch
Unless I'm missing something in the documentation, currently apt-ftparchive doesn't support adding all of the packages in binary-all to the individual package files for each architecture. Looking at the Debian archive, this
is the expected behavior, and apt-get doesn't download the binary-all
Package file and therefore will miss any architecture-independent packages
in an archive indexed by apt-ftparchive.
Currently, other tools have to work around this by including all as an architecture and then merging Package files together, but that doesn't
address the Contents-* files, which have a similar problem.
The attached patch fixes this. It adds an IncludeAll boolean configuration option, defaulting to false, that if set to true will include the binary-all packages in every binary-$(ARCH)/Packages file (and from there, Contents
picks them up).
Please let me know if there are any problems; I'm happy to redo the patch
if needed.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C)
Versions of packages apt-utils depends on:
ii apt [libapt-pkg-libc6.3-5-3 0.5.26 Advanced front-end for dpkg
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libdb4.2 4.2.52-16 Berkeley v4.2 Database Libraries [ ii libgcc1 1:3.4.1-5 GCC support library
ii libstdc++5 1:3.3.4-3 The GNU Standard C++ Library v3
-- no debconf information
--- apt-0.5.27/ftparchive/apt-ftparchive.cc.orig 2004-01-02 13:48:13.000000000 -0800
+++ apt-0.5.27/ftparchive/apt-ftparchive.cc 2004-08-10 19:36:03.000000000 -0700
@@ -46,6 +46,7 @@
{
// General Stuff
string BaseDir;
+ string AllDir;
string InternalPrefix;
string FLFile;
string PkgExt;
@@ -185,6 +186,9 @@
{
if (Packages.RecursiveScan(flCombine(ArchiveDir,BaseDir)) == false)
return false;
+ if (AllDir != "")
+ if (Packages.RecursiveScan(flCombine(ArchiveDir,AllDir)) == false)
+ return false;
}
else
{
@@ -433,6 +437,8 @@
"$(DIST)/$(SECTION)/binary-$(ARCH)/");
string DSDir = Setup.Find("TreeDefault::SrcDirectory",
"$(DIST)/$(SECTION)/source/");
+ string DADir = Setup.Find("TreeDefault::AllDirectory",
+ "$(DIST)/$(SECTION)/binary-all/");
string DPkg = Setup.Find("TreeDefault::Packages",
"$(DIST)/$(SECTION)/binary-$(ARCH)/Packages");
string DIPrf