[PATCH] gnu: s3cmd: Fix program name in --help output.

  • Done
  • quality assurance status badge
Details
2 participants
  • Matthew James Kraai
  • Ludovic Courtès
Owner
unassigned
Submitted by
Matthew James Kraai
Severity
normal

Debbugs page

Matthew James Kraai wrote 2 years ago
(address . guix-patches@gnu.org)(name . Matthew James Kraai)(address . kraai@ftbfs.org)
20221021032151.26992-1-kraai@ftbfs.org
* gnu/packages/python-xyz.scm (s3cmd)[arguments]: Add a new 'hide-wrapping
phase.
---
gnu/packages/python-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)

The Commands section of `s3cmd --help`'s output displays `.s3cmd-real` instead
of `s3cmd` in the commands (e.g., `.s3cmd-real mb s3://BUCKET`). This makes
it display `s3cmd` instead (e.g., `s3cmd mb s3://BUCKET`).

Toggle diff (20 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32bd986a12..81fa89fec2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16222,6 +16222,13 @@ (define-public s3cmd
(sha256
(base32 "0rdgwwmmp8mdxc84bxq6k9a7v7z2qgc3df47djzs2b84gw81dglx"))))
(build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'hide-wrapping
+ (lambda _
+ (substitute* "s3cmd"
+ (("optparser\\.get_prog_name\\(\\)") "\"s3cmd\"")))))))
(inputs
(list python-dateutil
python-magic))
--
2.38.0
Matthew James Kraai wrote 2 years ago
Updated patch
(address . 58673@debbugs.gnu.org)
Y1T6Of/gFZ2yvL6d@carlo
From 139a7cfe0398bb4bbe904ec58887f681de177657 Mon Sep 17 00:00:00 2001
From: Matthew James Kraai <kraai@ftbfs.org>
Date: Thu, 20 Oct 2022 20:16:00 -0700
Subject: [PATCH] gnu: s3cmd: Fix program name in output.

* gnu/packages/python-xyz.scm (s3cmd)[arguments]: Add a new 'hide-wrapping
phase.
---
gnu/packages/python-xyz.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Here's an updated patch that also fixes the command name in messages displayed
by s3cmd.

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32bd986a12..e795fa1838 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16222,6 +16222,15 @@ (define-public s3cmd
(sha256
(base32 "0rdgwwmmp8mdxc84bxq6k9a7v7z2qgc3df47djzs2b84gw81dglx"))))
(build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'hide-wrapping
+ (lambda _
+ (substitute* "S3/MultiPart.py"
+ (("sys\\.argv\\[0\\]") "\"s3cmd\""))
+ (substitute* "s3cmd"
+ (("optparser\\.get_prog_name\\(\\)") "\"s3cmd\"")))))))
(inputs
(list python-dateutil
python-magic))
--
2.38.0
Ludovic Courtès wrote 2 years ago
Re: bug#58673: [PATCH] gnu: s3cmd: Fix program name in --help output.
(name . Matthew James Kraai)(address . kraai@ftbfs.org)(address . 58673-done@debbugs.gnu.org)
87sfigbca0.fsf_-_@gnu.org
Hi,

Matthew James Kraai <kraai@ftbfs.org> skribis:

Toggle quote (8 lines)
>>From 139a7cfe0398bb4bbe904ec58887f681de177657 Mon Sep 17 00:00:00 2001
> From: Matthew James Kraai <kraai@ftbfs.org>
> Date: Thu, 20 Oct 2022 20:16:00 -0700
> Subject: [PATCH] gnu: s3cmd: Fix program name in output.
>
> * gnu/packages/python-xyz.scm (s3cmd)[arguments]: Add a new 'hide-wrapping
> phase.

Applied, thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58673@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58673
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help