[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: broken $MIRROR/dists/$CODENAME/Release file



I applied this patch to make it work.  The new code does not have the
recompression code in it, so it won't corrupt sums either.  However,
there is that "bug #402482" comment in there that was stripped out, too.
Either way should fix my particular problem.  The deal is that you have
to do check sums on the final version of a file and not on a file that
is about to be replaced.

$ diff -up tools/make_disc_trees.pl~ tools/make_disc_trees.pl
--- tools/make_disc_trees.pl~   2007-11-09 14:00:31.979133000 -0800
+++ tools/make_disc_trees.pl    2007-11-16 11:39:22.044281000 -0800
@@ -328,14 +328,21 @@ sub md5_files_for_release {

        $filename = $File::Find::name;

+       if ($filename =~ m/\/.*\/(Packages|Sources)\.gz$/o) {
+               return 0;
+       }
+
        # Recompress the Packages and Sources files; workaround for bug
        # #402482
        if ($filename =~ m/\/.*\/(Packages|Sources)$/o) {
                system("gzip -9c < $_ >$_.gz");
+               ($md5, $size) = md5_file($_ . ".gz");
+               $filename =~ s/^\.\///;
+               printf RELEASE " %s %8d %s\n", $md5, $size, $filename . ".gz";
        }

        if ($filename =~ m/\/.*\/(Packages|Sources|Release)/o) {
-               $filename =~ s/^\.\///g;
+               $filename =~ s/^\.\///;
                ($md5, $size) = md5_file($_);
                printf RELEASE " %s %8d %s\n", $md5, $size, $filename;
        }



Reply to: