Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] set null IFS in v* commands
@ 2023-03-18 22:30 gandalf3
  2023-03-18 22:54 ` paper42
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gandalf3 @ 2023-03-18 22:30 UTC (permalink / raw)
  To: ml

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

There is a new pull request by gandalf3 against master on the void-packages repository

https://github.com/gandalf3/void-packages master
https://github.com/void-linux/void-packages/pull/42850

set null IFS in v* commands
without this, if `<pattern>` arguments contain whitespace, word splitting causes the argument to be split unexpectedly.

for example:
    `vcopy 'Spacey Folder/*.ttf' usr/share/TTF/`

calls something equivalent to
    `cp "Spacey" "Folder/*.ttf" usr/share/TTF/`

which of course fails.

i couldn't find a way to escape word splitting from outside, aside from setting `IFS`.
i'm not at all confident this won't break anything else in install.sh, but if it doesn't, i think it would be nice to preserve the expectation that `<pattern>` arguments are just pure globs.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/42850.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-42850.patch --]
[-- Type: text/x-diff, Size: 952 bytes --]

From 5ba6bdefef67bdcc87e3badd67b3502b5c66f1cb Mon Sep 17 00:00:00 2001
From: gandalf3 <gandalf3@blendermonkey.com>
Date: Sat, 18 Mar 2023 15:07:28 -0700
Subject: [PATCH] set null IFS in v* commands

without this, if <pattern> arguments contain whitespace, word splitting
causes the pattern argument to be split unexpectedly.

for example:
    vcopy 'Spacey Folder/*.ttf' usr/share/TTF/

calls something equivilent to
    cp "Spacey" "Folder/*.ttf" usr/share/TTF/

which of course fails.
---
 common/environment/setup/install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index b0c5b22f4c2a..0bf3a1417a37 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -9,7 +9,7 @@ unalias -a
 # disable wildcards helper
 _noglob_helper() {
        set +f
-       "$@"
+       IFS= "$@"
 }
 
 # Apply _noglob to v* commands

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
@ 2023-03-18 22:54 ` paper42
  2023-03-20  4:42 ` classabbyamp
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paper42 @ 2023-03-18 22:54 UTC (permalink / raw)
  To: ml

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

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1475022920

Comment:
I can't comment on the functionality now, but one more administrative note, please make sure the email you used for the commit is added to your github profile so it can properly attribute it to you. (the icon next to the commit should be your profile picture and be clickable)

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
  2023-03-18 22:54 ` paper42
@ 2023-03-20  4:42 ` classabbyamp
  2023-03-28 15:21 ` Chocimier
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-03-20  4:42 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1475612460

Comment:
this seems fine to me, but I'd like to see another maintainer comment on it too

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
  2023-03-18 22:54 ` paper42
  2023-03-20  4:42 ` classabbyamp
@ 2023-03-28 15:21 ` Chocimier
  2023-03-28 15:25 ` classabbyamp
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chocimier @ 2023-03-28 15:21 UTC (permalink / raw)
  To: ml

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

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1487097552

Comment:
@gandalf3, where did you hit this issue?

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
                   ` (2 preceding siblings ...)
  2023-03-28 15:21 ` Chocimier
@ 2023-03-28 15:25 ` classabbyamp
  2023-03-28 19:25 ` Chocimier
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-03-28 15:25 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1487107213

Comment:
it was in https://github.com/void-linux/void-packages/pull/42848 

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
                   ` (3 preceding siblings ...)
  2023-03-28 15:25 ` classabbyamp
@ 2023-03-28 19:25 ` Chocimier
  2023-06-27  2:08 ` github-actions
  2023-07-12  2:06 ` [PR PATCH] [Closed]: " github-actions
  6 siblings, 0 replies; 8+ messages in thread
From: Chocimier @ 2023-03-28 19:25 UTC (permalink / raw)
  To: ml

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

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1487480692

Comment:
How about pushing setting IFS down to cp call? We may need word splitting later on for vsv's LN_OPTS.

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

* Re: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
                   ` (4 preceding siblings ...)
  2023-03-28 19:25 ` Chocimier
@ 2023-06-27  2:08 ` github-actions
  2023-07-12  2:06 ` [PR PATCH] [Closed]: " github-actions
  6 siblings, 0 replies; 8+ messages in thread
From: github-actions @ 2023-06-27  2:08 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/42850#issuecomment-1608597566

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: [PR PATCH] [Closed]: set null IFS in v* commands
  2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
                   ` (5 preceding siblings ...)
  2023-06-27  2:08 ` github-actions
@ 2023-07-12  2:06 ` github-actions
  6 siblings, 0 replies; 8+ messages in thread
From: github-actions @ 2023-07-12  2:06 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

set null IFS in v* commands
https://github.com/void-linux/void-packages/pull/42850

Description:
without this, if `<pattern>` arguments contain whitespace, word splitting causes the argument to be split unexpectedly.

for example:
    `vcopy 'Spacey Folder/*.ttf' usr/share/TTF/`

calls something equivalent to
    `cp "Spacey" "Folder/*.ttf" usr/share/TTF/`

which of course fails.

i couldn't find a way to escape word splitting from outside, aside from setting `IFS`.
i'm not at all confident this won't break anything else in install.sh, but if it doesn't, i think it would be nice to preserve the expectation that `<pattern>` arguments are just pure globs.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

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

end of thread, other threads:[~2023-07-12  2:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 22:30 [PR PATCH] set null IFS in v* commands gandalf3
2023-03-18 22:54 ` paper42
2023-03-20  4:42 ` classabbyamp
2023-03-28 15:21 ` Chocimier
2023-03-28 15:25 ` classabbyamp
2023-03-28 19:25 ` Chocimier
2023-06-27  2:08 ` github-actions
2023-07-12  2:06 ` [PR PATCH] [Closed]: " github-actions

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 NNTP newsgroup(s).