Bug#1063252: Proposed fix broke pristine-tar for me

2024-03-10 Thread Sebastian Andrzej Siewior
On 2024-03-10 00:12:46 [+0100], Andrea Pappacoda wrote:
> Hi, thanks for your fix!
Hi,

> Unfortunately it seems that your patch has broke tarball generation for one
> of the packages I maintain, dynarmic.
> 
>$ gbp export-orig
>gbp:info: Creating /home/tachi/dev/deb/dynarmic_6.5.0+ds.orig.tar.xz
>gbp:error: Pristine-tar couldn't verify "dynarmic_6.5.0+ds.orig.tar.xz":
> pristine-tar: /home/tachi/dev/deb/dynarmic/../dynarmic_6.5.0+ds.orig.tar.xz
> does not match stored hash (expected
> 46a18274c7d15c9bcc9eced74d050af412728ebf03083b76fb650b70acf8, got
> 7b56e580ab2c12003490dc2e2708106f37d51ebe4588b377f7557d5f7db34a6b)
> 
> I've been able to solve this issue locally by manually editing the `if
> (!$threads_set)` check to push `-T2` instead of `-T1` if no `-T` option was
> previously set, but I don't fully understand why this solves the issue.

Could you check the fix in #1065751?

> Wouldn't it be better to unconditionally pass `-T0` and depend on xz-utils
> >= 5.3.0 so that the multi-threaded compressor is always used and the output
> format is the same regardless of the machine used to generate the compressed
> archive?

I told pristine-tar to pass -T argument if none was found but forgot a
check and this didn't work. The update should work.
And the -T argument will be recorded conditionally from now on. You
can't always pass -T0 because the orig tarball may have been created
without threadding and this would break it.

> Thanks again!

Sebastian



Bug#1063252: Proposed fix broke pristine-tar for me

2024-03-10 Thread Andrea Pappacoda

Hi, thanks for your fix!

Unfortunately it seems that your patch has broke tarball generation for 
one of the packages I maintain, dynarmic.


   $ gbp export-orig
   gbp:info: Creating /home/tachi/dev/deb/dynarmic_6.5.0+ds.orig.tar.xz
   gbp:error: Pristine-tar couldn't verify 
"dynarmic_6.5.0+ds.orig.tar.xz": pristine-tar: 
/home/tachi/dev/deb/dynarmic/../dynarmic_6.5.0+ds.orig.tar.xz does not 
match stored hash (expected 
46a18274c7d15c9bcc9eced74d050af412728ebf03083b76fb650b70acf8, got 
7b56e580ab2c12003490dc2e2708106f37d51ebe4588b377f7557d5f7db34a6b)


I've been able to solve this issue locally by manually editing the `if 
(!$threads_set)` check to push `-T2` instead of `-T1` if no `-T` option 
was previously set, but I don't fully understand why this solves the 
issue.


Wouldn't it be better to unconditionally pass `-T0` and depend on 
xz-utils >= 5.3.0 so that the multi-threaded compressor is always used 
and the output format is the same regardless of the machine used to 
generate the compressed archive?


Thanks again!