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

Bug#503722: debian-cd: Comment "workaround for bug #402482" is WRONG



And here is a proposed patch: The idea is we do all the re-gzipping in one
pass and the md5summing in another.

Regards,

David.

--- make_disc_trees.pl.ORIG	2007-03-05 11:09:46.000000000 -0500
+++ make_disc_trees.pl	2008-10-27 16:49:08.000000000 -0400
@@ -323,16 +323,20 @@
	return ($md5, $st->size);
}

-sub md5_files_for_release {
-	my ($md5, $size, $filename);
-
+sub gzip_files_for_release {
+	my ($filename);
	$filename = $File::Find::name;
-
	# Recompress the Packages and Sources files; workaround for bug
	# #402482
	if ($filename =~ m/\/.*\/(Packages|Sources)$/o) {
		system("gzip -9c < $_ >$_.gz");
	}
+}
+
+sub md5_files_for_release {
+	my ($md5, $size, $filename);
+
+	$filename = $File::Find::name;

	if ($filename =~ m/\/.*\/(Packages|Sources|Release)/o) {
		$filename =~ s/^\.\///g;
@@ -494,6 +498,7 @@
	chdir "dists/$codename";
	open(RELEASE, ">>Release") || die "Failed to open Release file: $!\n";
	print RELEASE "MD5Sum:\n";
+	find (\&gzip_files_for_release, ".");
	find (\&md5_files_for_release, ".");
	close(RELEASE);
	chdir("../..");



Reply to: