Package: debarchiver
Version: 0.1.8
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Running debarchiver with apt-ftparchive creates Contents-$arch files.
Because packages in binary-all belong to every existing architecture,
Content-$arch should contain the content of Content-all too.
Content-all(.gz) should be removed. I cannot provide a real diff
(included fix for bzip2 support at my local machine), but I attached a
file containg the necessary changes, which need to be done to
generateIndexConfig() and handleIndex().

Regards, Daniel


- -- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (850, 'unstable'), (700, 'testing'), (110, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.15050330
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages debarchiver depends on:
ii  adduser                       3.63       Add and remove users and groups
ii  apt-utils                     0.5.28.6   APT utility programs
ii  dpkg-dev                      1.10.27    Package building tools for Debian
ii  opalmod                       0.1.13     A set of Perl modules for various 

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCcvDFdg0kG0+YFBERAgNbAJ96olUpCbkRMDr4k6yobIJ+VaWddACdE3Ej
rrRgmnNTSqEoBSN0btFmSVs=
=cLuq
-----END PGP SIGNATURE-----
sub generateIndexConfig() {
[..]
   # The common header.
   print CONF "Dir {\n";
   print CONF "  ArchiveDir \"$destcdir\";\n";
   print CONF "  Cachedir \"$cachedir\";\n";
   print CONF "};\n\n";
   print CONF "Default {\n";
   print CONF "  Packages::Compress \". gzip bzip2\";\n"
       if defined $bzip;
   print CONF "  Sources::Compress \". gzip bzip2\";\n"
       if defined $bzip;
+  print CONF "  Contents::Compress \". gzip\";\n";
   print CONF "};\n\n";
   print CONF "TreeDefault {\n";
   print CONF "  BinCacheDB \"cache.db\";\n";
   print CONF "  Release::Origin \"$release{origin}\";\n"
       if defined $release{origin};
   print CONF "  Release::Label \"$release{label}\";\n"
       if defined $release{label};
   print CONF "};\n\n";
[..]



sub handleIndex() {
[..]
   my %changedist = map { s%/.*%%; $_ => 1 } keys %dests;
   foreach $d (keys %changedist) {
     my (@dsections, @darches);
     &findSectionsArchitectures("$destdir/$d", [EMAIL PROTECTED], [EMAIL 
PROTECTED]);
+    if (-s "$d/Contents-all") {
+      foreach $a (@darches) {
+        next if ($a eq 'source' || $a eq 'all');
+        action(! open(ARCH, ">> $d/Contents-$a"),
+               "Append to $d/Contents-$a",
+               2);
+        action(! open(ALL, "$d/Contents-all"),
+               "Read $d/Contents-all",
+               2);
+        print ARCH <ALL>;
+        close ALL;
+        close ARCH;
+        cmdaction("gzip $d/Contents-$a -c > $d/Contents-$a.gz",
+                  "Compress merged Contents files",
+                  3);
+      }
+    }
+    unlink("$d/Contents-all", "$d/Contents-all.gz");
     foreach $s (@dsections) {
       if (-s "$d/$s/binary-all/Packages") {
         foreach $_ (@darches) {
           $a = $_;
           next if ($a eq 'source' || $a eq 'all');
           $a = "binary-$a";
[..]

Reply via email to