>>>>> Joey Hess <[email protected]> writes:
> Vincent Ladeuil wrote:
>> But, the option name is now --block-list instead of --block-split.
> Won't use of this option cause the paranoia check to fail when
> reproducing the xz file, unless it's whitelisted there?
Ouch. Dang, I thought my tests covered that, obviously not :-/
Fixed (and also added --check={crc64,none} while I was there).
> (Also, changelog,
Done in the attached patch ?
> git commit etc would be useful.)
Not sure what you mean here, I'm using bzr (based on
bzr+ssh://bazaar.launchpad.net/+branch/pristine-tar/) not git :-}
https://code.launchpad.net/~vcs-imports/pristine-tar/trunk is an import
from git://git.kitenet.net/pristine-tar/ though so there should be a
way...
In the mean time, I've pushed my branch at
bzr+ssh://bazaar.launchpad.net/~vila/pristine-tar/677250-parse-xz or
https://code.launchpad.net/~vila/pristine-tar/677250-parse-xz/ for human
readers.
I'm also quite a noob at packaging but I'm eager to learn...
Vincent
P.S.: I'll be in vacations for a week starting tonight.
modified debian/changelog
modified pristine-xz
=== modified file 'debian/changelog'
--- debian/changelog 2012-06-19 13:28:41 +0000
+++ debian/changelog 2012-07-12 06:52:07 +0000
@@ -1,9 +1,8 @@
pristine-tar (1.26) UNRELEASED; urgency=low
* pristine-xz: Use xz --robot to extract information from xz files,
- avoiding the need to do more expensive guessing. Will also later
- allow supporting files needing --block-split (once upstream xz
- provides that option; a patch has been submitted).
+ avoiding the need to do more expensive guessing. Support --block-list
+ when available to reproduce multi blocks files.
Closes: #677250 Thanks, Vincent Ladeuil
-- Joey Hess <[email protected]> Tue, 19 Jun 2012 09:24:30 -0400
=== modified file 'pristine-xz'
--- pristine-xz 2012-06-19 13:28:41 +0000
+++ pristine-xz 2012-07-12 07:33:57 +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,13 +199,13 @@
}
if (scalar(@$blocks) > 1) {
# Gather the block uncompressed sizes
- $block_split = join(',', map {$_->{uncompressed_size}}
+ $block_list = join(',', map {$_->{uncompressed_size}}
@$blocks);
}
}
- # FIXME: none is missing
my %check_kwd_of =
- (CRC32 => 'crc32',
+ (None => 'none',
+ CRC32 => 'crc32',
CRC64 => 'crc64',
'SHA-256' => 'sha256',
);
@@ -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"];
@@ -350,8 +347,11 @@
next if $param=~/^(-[0-9]e?)$/;
next if $param eq '-z';
+ next if $param eq '--check=none';
next if $param eq '--check=crc32';
+ next if $param eq '--check=crc64';
next if $param eq '--check=sha256';
+ next if $param=~/^(--block-list=[0-9,]+)$/;
die "paranoia check failed on params from delta (@params)";
}
@params=split(' ', $delta->{params});