public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH cygport] lib/src_prep.cygpart: Fix incorrect options passed to unzstd in unpack()
@ 2023-07-29 20:55 yak_ex
  2023-07-30 12:27 ` Jon Turney
  2023-07-30 18:31 ` ASSI
  0 siblings, 2 replies; 11+ messages in thread
From: yak_ex @ 2023-07-29 20:55 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

Hi maintainers,

This is my first post here.
The attached tiny patch fixes incorrect options passed to unzstd in unpack()
in lib/src_prep.cygpart.

`unpack()` invokes `unzstd` for a *.zst file as
`unzstd -qo file.zst`
Then, an error occurs as 'stdin is a console, aborting',
because the `-o` option is to specify an output file name.

There are some choices to fix it. This patch aligns with handling .gz
and .bz2 like
`unzstd -c file.zst > file`.

Regards,
Yasutaka ATARASHI
---
Yasutaka ATARASHI <yak1ex@gmail.com>

[-- Attachment #2: src_prep_unpack.patch --]
[-- Type: application/octet-stream, Size: 336 bytes --]

--- lib/src_prep.cygpart.orig	2023-07-29 17:00:50.409163400 +0900
+++ lib/src_prep.cygpart	2023-07-29 17:01:16.683974800 +0900
@@ -138,7 +138,8 @@
 				;;
 			*.zst)
 				check_prog_req zstd;
-				unpack_cmd="unzstd -qo";
+				unpack_cmd="unzstd -c";
+				unpack_out="${unpack_file_name%.zst}";
 				;;
 			*.7z)
 				if check_prog 7zr

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH cygport] lib/src_prep.cygpart: Fix incorrect options passed to unzstd in unpack()
@ 2023-07-29  8:23 Yasutaka ATARASHI
  0 siblings, 0 replies; 11+ messages in thread
From: Yasutaka ATARASHI @ 2023-07-29  8:23 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

Hi, maintainers.

The attached tiny patch fixes incorrect options passed to unzstd in unpack()
in lib/src_prep.cygpart.

unpack() in lib/src_prep.cygpart calls unzstd for a *.zst file as
`unzstd -qo file.zst`
Then, an error occurrs as 'stdin is a console, aborting'.

There are some choices to fix it, this patch aligns with handling .gz and .bz2.

-- 
Yasutaka ATARASHI <atara-y@mx.scn.tv>

[-- Attachment #2: src_prep_unpack.patch --]
[-- Type: application/octet-stream, Size: 336 bytes --]

--- lib/src_prep.cygpart.orig	2023-07-29 17:00:50.409163400 +0900
+++ lib/src_prep.cygpart	2023-07-29 17:01:16.683974800 +0900
@@ -138,7 +138,8 @@
 				;;
 			*.zst)
 				check_prog_req zstd;
-				unpack_cmd="unzstd -qo";
+				unpack_cmd="unzstd -c";
+				unpack_out="${unpack_file_name%.zst}";
 				;;
 			*.7z)
 				if check_prog 7zr

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-08-07 17:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-29 20:55 [PATCH cygport] lib/src_prep.cygpart: Fix incorrect options passed to unzstd in unpack() yak_ex
2023-07-30 12:27 ` Jon Turney
2023-08-04 17:51   ` ASSI
2023-08-07 16:54     ` Jon Turney
2023-08-07 17:28       ` ASSI
2023-07-30 18:31 ` ASSI
2023-08-04 17:28   ` Yasutaka ATARASHI
2023-08-04 18:14     ` ASSI
2023-08-04 18:39       ` Yasutaka ATARASHI
2023-08-07 16:54         ` Jon Turney
  -- strict thread matches above, loose matches on Subject: below --
2023-07-29  8:23 Yasutaka ATARASHI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).