Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] base-files: fix /etc/profile call to unset appendpath
@ 2025-01-25 15:22 NyaaaWhatsUpDoc
  2025-01-27 15:38 ` mtboehlke
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: NyaaaWhatsUpDoc @ 2025-01-25 15:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/NyaaaWhatsUpDoc/void-packages fix-etc-profile
https://github.com/void-linux/void-packages/pull/54105

base-files: fix /etc/profile call to unset appendpath
#### Testing the changes
- I tested the changes in this PR: **YES**

Have confirmed this behaviour of unset in bash, mksh and dash myself. And to quote the `unset` section of the manpage for sh (noting in particular the final sentence):

```
     unset [-fv] name ...
            The specified variables and functions are unset and unexported.
            If -f or -v is specified, the corresponding function or variable
            is unset, respectively.  If a given name corresponds to both a
            variable and a function, and no options are given, only the
            variable is unset.
```



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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-etc-profile-54105.patch --]
[-- Type: text/x-diff, Size: 666 bytes --]

From d83033950177cdd9a1fbbb2e0459b0e7c04ebbe9 Mon Sep 17 00:00:00 2001
From: kim <grufwub@gmail.com>
Date: Sat, 25 Jan 2025 15:17:49 +0000
Subject: [PATCH] base-files: fix /etc/profile call to unset appendpath

---
 srcpkgs/base-files/files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566c0b..e762b4dbc8d952 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -18,7 +18,7 @@ appendpath '/usr/bin'
 appendpath '/usr/sbin'
 appendpath '/sbin'
 appendpath '/bin'
-unset appendpath
+unset -f appendpath
 
 export PATH
 

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

* Re: base-files: fix /etc/profile call to unset appendpath
  2025-01-25 15:22 [PR PATCH] base-files: fix /etc/profile call to unset appendpath NyaaaWhatsUpDoc
@ 2025-01-27 15:38 ` mtboehlke
  2025-01-27 17:43 ` mtboehlke
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mtboehlke @ 2025-01-27 15:38 UTC (permalink / raw)
  To: ml

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

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/54105#issuecomment-2616097334

Comment:
Thanks for bringing this up.  Imho I think this is a good change for consistent behavior across multiple shells.

I actually made this change a while ago on my machine (and even made a noextract entry for /etc/profile), but kind of forgot about it.  I use oksh as the login shell, which is why I think I noticed it at all.  From what I can tell, bash will happily unset the function even without the -f flag, as long as there isn't a variable.  The man page makes it sound like maybe that's what dash will do as well, but I don't think that's true.  At least oksh and dash seem to require -f to unset a function.


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

* Re: base-files: fix /etc/profile call to unset appendpath
  2025-01-25 15:22 [PR PATCH] base-files: fix /etc/profile call to unset appendpath NyaaaWhatsUpDoc
  2025-01-27 15:38 ` mtboehlke
@ 2025-01-27 17:43 ` mtboehlke
  2025-04-28  2:10 ` github-actions
  2025-05-12  2:12 ` [PR PATCH] [Closed]: " github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: mtboehlke @ 2025-01-27 17:43 UTC (permalink / raw)
  To: ml

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

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/54105#issuecomment-2616097334

Comment:
Thanks for bringing this up.  Imho I think this is a good change for consistent behavior across multiple shells.

I actually made this change a while ago on my machine (and even made a noextract entry for /etc/profile), but kind of forgot about it.  I use oksh as the login shell, which is why I think I noticed it at all.  From what I can tell, bash will happily unset the function even without the -f flag, as long as there isn't a variable with the same name.  The man page makes it sound like maybe that's what dash will do as well, but I don't think that's true.  At least oksh and dash seem to require -f to unset a function.


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

* Re: base-files: fix /etc/profile call to unset appendpath
  2025-01-25 15:22 [PR PATCH] base-files: fix /etc/profile call to unset appendpath NyaaaWhatsUpDoc
  2025-01-27 15:38 ` mtboehlke
  2025-01-27 17:43 ` mtboehlke
@ 2025-04-28  2:10 ` github-actions
  2025-05-12  2:12 ` [PR PATCH] [Closed]: " github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2025-04-28  2:10 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/54105#issuecomment-2833814608

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] 5+ messages in thread

* Re: [PR PATCH] [Closed]: base-files: fix /etc/profile call to unset appendpath
  2025-01-25 15:22 [PR PATCH] base-files: fix /etc/profile call to unset appendpath NyaaaWhatsUpDoc
                   ` (2 preceding siblings ...)
  2025-04-28  2:10 ` github-actions
@ 2025-05-12  2:12 ` github-actions
  3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2025-05-12  2:12 UTC (permalink / raw)
  To: ml

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

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

base-files: fix /etc/profile call to unset appendpath
https://github.com/void-linux/void-packages/pull/54105

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

Have confirmed this behaviour of unset in bash, mksh and dash myself. And to quote the `unset` section of the manpage for sh:

```
     unset [-fv] name ...
            The specified variables and functions are unset and unexported.
            If -f or -v is specified, the corresponding function or variable
            is unset, respectively.  If a given name corresponds to both a
            variable and a function, and no options are given, only the
            variable is unset.
```



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

end of thread, other threads:[~2025-05-12  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 15:22 [PR PATCH] base-files: fix /etc/profile call to unset appendpath NyaaaWhatsUpDoc
2025-01-27 15:38 ` mtboehlke
2025-01-27 17:43 ` mtboehlke
2025-04-28  2:10 ` github-actions
2025-05-12  2:12 ` [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).