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

Bug#767253: Acknowledgement (Please provide hashes for uncompressed Translation-* )



Hi,

I had a quick look at the debian-cd scripts and something like the
attached (and totally untested) patch is probably sufficient. 

The idea is that we keep both Translation-* and Translation-*.gz
around, then generate the Release file with the hashes and then remove
the uncompressed files from the CD. Apt should really not need the
uncompressed files on the cdrom, but it does need them in the Release
file for the verification.

Sorry that I have not tested this, I'm not familiar with the cd
building and I couldn't find unittests. But I'm happy to dig into it
if needed.

Thanks for your consideration,
 Michael
diff -Nru debian-cd-3.1.15/tools/make_disc_trees.pl debian-cd-3.1.16/tools/make_disc_trees.pl
--- debian-cd-3.1.15/tools/make_disc_trees.pl	2014-06-03 16:45:55.000000000 +0200
+++ debian-cd-3.1.16/tools/make_disc_trees.pl	2014-10-29 16:43:15.000000000 +0100
@@ -574,6 +574,16 @@
 	$st = stat($filename) || die "Stat error on '$filename': $!\n";
 	return ($checksum, $st->size);
 }
+sub remove_uncompressed {
+	my ($filename);
+
+	$filename = $File::Find::name;
+        if ($filename =~ m/\/.*\/(Packages|Sources)$/o ||
+            $filename =~ m/\/.*\/i18n\/(Translation-[a-z]+)$/o)
+        {
+            unlink($filename);
+        }
+}
 
 sub recompress {
 	# Recompress various files
@@ -588,7 +598,7 @@
     # Translation files need to be compressed in .gz format on CD?
 	if ($filename =~ m/\/.*\/i18n\/(Translation.*)$/o &&
         ! ($filename =~ m/\/.*\/i18n\/(Translation.*gz)$/o)) {
-		system("gzip -9 $_");
+		system("gzip -9c < $_ >$_.gz");
 	}
 }	
 
@@ -829,6 +839,7 @@
 	find (\&recompress, ".");
 	checksum_files_for_release();
 	close(RELEASE);
+        find (\&remove_uncompressed, ".");
 	chdir("../..");
 
 	print "  Finishing off md5sum.txt\n";

Reply to: