[PATCH cygport] lib/src_prep.cygpart: Fix incorrect options passed to unzstd in unpack()

Yasutaka ATARASHI yak1ex@gmail.com
Fri Aug 4 17:28:14 GMT 2023


Sorry for the late reply.

I updated the patch to handle the case of .xz, also, and a bit
adjusted the arguments of `check_prog_req`.

Jon Turney writes:
>Do you have an example of a cygport which fails without this fix, so I
>can add a test for this?

My motivating example is far from the minimum, so I made a tiny
example from the base-cygwin package. Without the attached patch, the
case of test.patch.{gz,bz2} works, on the other hand, the case of
test.patch.{xz,zst} fails.
Not only .zst, but also .xz fails.
This is because `cygpatch()` condiers *.xz files but `unpack()` can't
handle *.xz files except for *.tar.xz.

ASSI via Cygwin-apps writes:
> Hmm. I'd would have preferred to use the --keep option (which is the
> default for unzstd anyway) and save the redirection (also for the other
> programs that offer that option).

Yeah, I also wonder why the --keep option is not used for .gz and .bz2.
Now, I recognized the reason.
`unpack()` is expected to extract the files to the current working
directory regardless of the specified path of the input. Please see
the usage in `__src_prep()`.
Therefore, --keep option can't be used simply.

Regards,
Yasutaka ATARASHI
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src_prep_unpack_rev2.patch
Type: application/octet-stream
Size: 543 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-apps/attachments/20230805/453feda4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tar.xz
Type: application/octet-stream
Size: 2724 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-apps/attachments/20230805/453feda4/attachment-0001.obj>


More information about the Cygwin-apps mailing list