Tweak handling of (un)compressed index files
Provide hashes for uncompressed Translation-* files, and remove the uncompressed versions from the output disc. Closes: #767253. Initial patch from Michael Vogt - thanks!
This commit is contained in:
parent
3fccac5364
commit
2f34797490
|
@ -1,3 +1,12 @@
|
|||
debian-cd (3.1.17) UNRELEASED; urgency=medium
|
||||
|
||||
[ Steve McIntyre ]
|
||||
* Provide hashes for uncompressed Translation-* files, and remove the
|
||||
uncompressed versions from the output disc. Closes: #767253. Initial
|
||||
patch from Michael Vogt - thanks!
|
||||
|
||||
-- Steve McIntyre <93sam@debian.org> Wed, 29 Oct 2014 17:33:10 +0000
|
||||
|
||||
debian-cd (3.1.16) unstable; urgency=medium
|
||||
|
||||
[ Steve McIntyre ]
|
||||
|
|
|
@ -575,6 +575,19 @@ sub checksum_file {
|
|||
return ($checksum, $st->size);
|
||||
}
|
||||
|
||||
sub remove_uncompressed {
|
||||
my ($filename);
|
||||
|
||||
$filename = $File::Find::name;
|
||||
print "remove_uncompressed: looking at $filename\n";
|
||||
|
||||
if ($filename =~ m/\/.*\/(Packages|Sources)$/o ||
|
||||
$filename =~ m/\/.*\/i18n\/(Translation-[_a-zA-Z]+)$/o)
|
||||
{
|
||||
unlink($_) or die "Failed to remove $_: $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub recompress {
|
||||
# Recompress various files
|
||||
my ($filename);
|
||||
|
@ -588,7 +601,7 @@ sub recompress {
|
|||
# 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 +842,7 @@ sub finish_disc {
|
|||
find (\&recompress, ".");
|
||||
checksum_files_for_release();
|
||||
close(RELEASE);
|
||||
find (\&remove_uncompressed, ".");
|
||||
chdir("../..");
|
||||
|
||||
print " Finishing off md5sum.txt\n";
|
||||
|
|
Loading…
Reference in New Issue