perl: also mark git-contacts executable
PATCH 1/1 perl: also mark git-contacts executable
When install git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.
---
Tested like [1]. I was surprised to find my packager didn't have contacts installed, despite it being requested. But the issue is upstream (here): the installer doesn't mark the program as executable. I wrote this on top of the patch in [1], but it should be independent. A quick test says the prerequisite-patch-id shouldn't bother application?
[1]: https://lore.kernel.org/git/[email protected]/T/#t
generate-perl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
generate-perl.sh +1 -1
@@ -30,7 +30,7 @@ "$INPUT" >"$OUTPUT" case "$INPUT" in -*.perl) +*.perl|*git-contacts) chmod a+x "$OUTPUT";; *) ;;
base-commit: 7f278e958afbf9b7e0727631b4c26dcfa1c63d6e
prerequisite-patch-id: 664e4667d11a226a89da52814505a0c8d31b9fba
Signature · 1 line
2.48.1
Quoted 1 line · D. Ben Knoble
When install git-contacts with Meson via -Dcontrib=contacts, the default
s/install/installing/
Quoted 5 lines
Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike
generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.
Yeah, that feels sensibel to me.
generate-perl.sh line 36
Quoted 13 lines
generate-perl.sh +1
-1@@ -30,7 +30,7 @@ "$INPUT" >"$OUTPUT" case "$INPUT" in -*.perl) +*.perl|*git-contacts) chmod a+x "$OUTPUT";; *) ;;
And the change looks as expected. An alternative could of course be to rename the file in-tree to "git-contacts.perl". In that case we wouldn't require this special case at all. But I guess that this here is good enough, and there might be other consequences if we renamed the script.
Thanks!
Patrick
Quoted 8 lines · Patrick Steinhardt
Quoted 1 line · D. Ben Knoble
When install git-contacts with Meson via -Dcontrib=contacts, the default
s/install/installing/
Thanks. If Junio doesn’t mind the trivial fix, I’ll avoid sending v2 for now :)
Quoted 16 lines
Quoted 6 lines
Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike
generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.Yeah, that feels sensibel to me.
Quoted 7 lines
generate-perl.sh +0
-0@@ -30,7 +30,7 @@ "$INPUT" >"$OUTPUT"
Quoted 11 lines
Quoted 6 lines
case "$INPUT" in
generate-perl.sh +1
-1-*.perl) +*.perl|*git-contacts) chmod a+x "$OUTPUT";;*)
;;And the change looks as expected. An alternative could of course be to rename the file in-tree to "git-contacts.perl". In that case we wouldn't require this special case at all. But I guess that this here is good enough, and there might be other consequences if we renamed the script.
My worry too.
Quoted 3 lines
Thanks!
Patrick
Thanks for the review!
Quoted 8 lines · Ben Knoble
Quoted 6 lines · Patrick Steinhardt
Quoted 1 line · D. Ben Knoble
When install git-contacts with Meson via -Dcontrib=contacts, the default
s/install/installing/
Thanks. If Junio doesn’t mind the trivial fix, I’ll avoid sending v2 for now :)
We'd be in pre-release freeze starting with -rc1, so no need to hurry.
Quoted 4 lines
Quoted 4 lines
And the change looks as expected. An alternative could of course be to rename the file in-tree to "git-contacts.perl". In that case we wouldn't require this special case at all. But I guess that this here is good enough, and there might be other consequences if we renamed the script.
Heh, I tend to thnik that consistently naming any Perl source to end in .perl (and Shell .sh) is the right fix, but anything in contrib/ is allowed to be sloppy ;-)
PATCH v2 1/1 perl: also mark git-contacts executable
In reply to D. Ben KnobleWhen installing git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.
---
A small typo fix for the commit message, thanks to Patrick.
generate-perl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
generate-perl.sh +1 -1
@@ -30,7 +30,7 @@ "$INPUT" >"$OUTPUT" case "$INPUT" in -*.perl) +*.perl|*git-contacts) chmod a+x "$OUTPUT";; *) ;;
Diff-intervalle contre v1 :
1: 7fbb341e8f ! 1: 15f07afcb6 perl: also mark git-contacts executable
@@ Metadata
## Commit message ##
perl: also mark git-contacts executable
- When install git-contacts with Meson via -Dcontrib=contacts, the default
- Perl generation fails to mark it executable. As a result, "git contacts"
- reports "'contacts' is not a git command."
+ When installing git-contacts with Meson via -Dcontrib=contacts, the
+ default Perl generation fails to mark it executable. As a result, "git
+ contacts" reports "'contacts' is not a git command."
Unlike generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.
base-commit: 7f278e958afbf9b7e0727631b4c26dcfa1c63d6e
prerequisite-patch-id: 664e4667d11a226a89da52814505a0c8d31b9fba
Signature · 1 line
2.52.0.rc0.71.g03eda12af0.dirty
Quoted 7 lines · D. Ben Knoble
When installing git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike
generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.
Quoted 6 lines
Signed-off-by D. Ben Knoble <[email protected]>---
A small typo fix for the commit message, thanks to Patrick.
Together with the html one, these patches match what I have already queued with local tweaks, so I won't replace them (they are in 'next' now).
Thanks.
Quoted 15 lines · Junio C Hamano
Quoted 12 lines · D. Ben Knoble
When installing git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike
generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.Signed-off-by D. Ben Knoble <[email protected]>---
A small typo fix for the commit message, thanks to Patrick.
Quoted 7 lines
Quoted 1 line
Together with the html one, these patches match what I have already queued with local tweaks, so I won't replace them (they are in 'next' now).
Thanks.
Ah, sounds good. That was one of the things I wanted to ask by "shall I send v2 or does Junio mind the trivial fix," and I should have been more direct.
Thanks.
Quoted 22 lines · D. Ben Knoble
Quoted 21 lines · Junio C Hamano
Quoted 7 lines · D. Ben Knoble
When installing git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command."
Unlike
generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from.Quoted 6 lines
Signed-off-by D. Ben Knoble <[email protected]>---
A small typo fix for the commit message, thanks to Patrick.
Together with the html one, these patches match what I have already queued with local tweaks, so I won't replace them (they are in 'next' now).
Quoted 5 lines
Quoted 1 line
Thanks.
Ah, sounds good. That was one of the things I wanted to ask by "shall I send v2 or does Junio mind the trivial fix," and I should have been more direct.
No, your question did reach me loud and clear.