>>>>> Joey Hess <jo...@debian.org> writes:

    > Ok, I've applied this in git.

Thanks.

    > I'll release it later, so send more patches if needed.

Sorry for the delay, I was waiting for xz-utils maintainer to commit the
patch I was testing.

This has now occurred and the code will be available as part of xz-utils
5.1.2alpha (whenever it's released, hopefully soon according to the xz
maintainer).

But, the option name is now --block-list instead of --block-split.

Therefore, the attached additional patch change the option name and
activates it.

If the option is not available (because the installed xz is too old), it
will fail and fallback to the usual guessing.

pristine-xz will ultimately fails but without a newer xz there is
nothing we can do anyway.

I've tested the attached patch against a newer xz and it works as
expected.

        Vincent

P.S.: I think I've got the indent style right this time ;)

   modified      pristine-xz
                                                                        

=== modified file 'pristine-xz'
--- pristine-xz	2012-06-19 13:28:41 +0000
+++ pristine-xz	2012-07-11 08:32:02 +0000
@@ -168,7 +168,7 @@
 sub predict_xz_args {
 	my ($xz) = @_;
 	my $presets = undef;
-	my $block_split = undef;
+	my $block_list = undef;
 	my $blocks = $xz->{blocks};
 	if (scalar(@$blocks)) {
 		# There is at least one block. We assume the same compression
@@ -199,7 +199,7 @@
 		}
 		if (scalar(@$blocks) > 1) {
 			# Gather the block uncompressed sizes
-			$block_split = join(',', map {$_->{uncompressed_size}}
+			$block_list = join(',', map {$_->{uncompressed_size}}
 					    @$blocks);
 		}
 	}
@@ -215,11 +215,8 @@
 
 	my $possible_args = [];
 	my $common = ["--check=$check_kwd", "-z"];
-	# FIXME: --block-split is not (yet) part of xz-utils upstream
-	if (0 && defined($block_split)) {
-		# We put the block list in front of the parameters to make it
-		# easier to filter it later.
-		unshift @$common, "--block-split=$block_split";
+	if (defined($block_list)) {
+		unshift @$common, "--block-list=$block_list";
 	}
 	foreach my $preset (@$presets) {
 		push @$possible_args, [@$common, "-$preset"];


Reply via email to