Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin
@ 2019-10-25  3:53 voidlinux-github
  2019-10-25  7:41 ` voidlinux-github
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-25  3:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages etc-profile
https://github.com/void-linux/void-packages/pull/15783

base-files: prefer /usr/local/bin to /usr/bin
Fix #15781

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

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

From 16a32321ba689ddcbf6767a8ba4e77a6ad6933fc Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 25 Oct 2019 10:30:37 +0700
Subject: [PATCH] base-files: prefer /usr/local/bin to /usr/bin

Fix #15781
---
 srcpkgs/base-files/files/profile | 10 +++++-----
 srcpkgs/base-files/template      |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566..9f6b9630d8c 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -2,22 +2,22 @@
 
 # System wide environment and startup programs.
 
+PATH="/usr/local/bin:/usr/local/sbin${PATH:+:$PATH}"
+
 appendpath () {
     case ":$PATH:" in
-        *:"$1":*)
+        *:"$1":*|*:"$1")
             ;;
         *)
-            PATH="${PATH:+$PATH:}$1"
+            PATH="$PATH:$1"
     esac
 }
 
 # Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
-appendpath '/usr/local/sbin'
-appendpath '/usr/local/bin'
 appendpath '/usr/bin'
 appendpath '/usr/sbin'
-appendpath '/sbin'
 appendpath '/bin'
+appendpath '/sbin'
 unset appendpath
 
 export PATH
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a049c59681d..0c517253b23 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=8
+revision=9
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

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

* Re: base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
@ 2019-10-25  7:41 ` voidlinux-github
  2019-10-25  8:09 ` voidlinux-github
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-25  7:41 UTC (permalink / raw)
  To: ml

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

New comment by Hoshpak on void-packages repository

https://github.com/void-linux/void-packages/pull/15783#issuecomment-546241687

Comment:
why?

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

* Re: base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
  2019-10-25  7:41 ` voidlinux-github
@ 2019-10-25  8:09 ` voidlinux-github
  2019-10-26 14:52 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-25  8:09 UTC (permalink / raw)
  To: ml

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

New comment by zdtcd on void-packages repository

https://github.com/void-linux/void-packages/pull/15783#issuecomment-546250770

Comment:
On 2019-10-25 07:41:43 +0000, Helmut Pozimski wrote:
> why?

Convention?

We usually expect to run the binary in /usr/local/bin instead of
/usr/bin if there're binary with same name in both location.

The intend's shown in the old profile code, i.e. we append
/usr/local/bin to PATH before appending /usr/bin.
But, both /bin and /usr/bin is existed in PATH before sourcing
/etc/profile, then the unintentional effect.

I would like to go as far as:

    PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH

-- 
Danh


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

* Re: [PR PATCH] [Updated] base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
  2019-10-25  7:41 ` voidlinux-github
  2019-10-25  8:09 ` voidlinux-github
@ 2019-10-26 14:52 ` voidlinux-github
  2019-10-26 14:52 ` voidlinux-github
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-26 14:52 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages etc-profile
https://github.com/void-linux/void-packages/pull/15783

base-files: prefer /usr/local/bin to /usr/bin
Fix #15781

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

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

From f1db00c0471534855104276ca6aee2f2442f9fb4 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 25 Oct 2019 10:30:37 +0700
Subject: [PATCH] base-files: prefer /usr/local/bin to /usr/bin

Fix #15781
---
 srcpkgs/base-files/files/profile | 20 ++++++++++----------
 srcpkgs/base-files/template      |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566..c43120ca632 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -2,23 +2,23 @@
 
 # System wide environment and startup programs.
 
-appendpath () {
+prependpath () {
     case ":$PATH:" in
-        *:"$1":*)
+        *:"$1":*|"$1":*|"$1")
             ;;
         *)
-            PATH="${PATH:+$PATH:}$1"
+            PATH="$1${PATH:+:$PATH}"
     esac
 }
 
 # Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
-appendpath '/usr/local/sbin'
-appendpath '/usr/local/bin'
-appendpath '/usr/bin'
-appendpath '/usr/sbin'
-appendpath '/sbin'
-appendpath '/bin'
-unset appendpath
+prependpath '/sbin'
+prependpath '/bin'
+prependpath '/usr/sbin'
+prependpath '/usr/bin'
+prependpath '/usr/local/sbin'
+prependpath '/usr/local/bin'
+unset prependpath
 
 export PATH
 
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a049c59681d..0c517253b23 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=8
+revision=9
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

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

* Re: [PR PATCH] [Updated] base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
                   ` (2 preceding siblings ...)
  2019-10-26 14:52 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-10-26 14:52 ` voidlinux-github
  2019-10-29  6:37 ` voidlinux-github
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-26 14:52 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages etc-profile
https://github.com/void-linux/void-packages/pull/15783

base-files: prefer /usr/local/bin to /usr/bin
Fix #15781

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

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

From f1db00c0471534855104276ca6aee2f2442f9fb4 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 25 Oct 2019 10:30:37 +0700
Subject: [PATCH] base-files: prefer /usr/local/bin to /usr/bin

Fix #15781
---
 srcpkgs/base-files/files/profile | 20 ++++++++++----------
 srcpkgs/base-files/template      |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566..c43120ca632 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -2,23 +2,23 @@
 
 # System wide environment and startup programs.
 
-appendpath () {
+prependpath () {
     case ":$PATH:" in
-        *:"$1":*)
+        *:"$1":*|"$1":*|"$1")
             ;;
         *)
-            PATH="${PATH:+$PATH:}$1"
+            PATH="$1${PATH:+:$PATH}"
     esac
 }
 
 # Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
-appendpath '/usr/local/sbin'
-appendpath '/usr/local/bin'
-appendpath '/usr/bin'
-appendpath '/usr/sbin'
-appendpath '/sbin'
-appendpath '/bin'
-unset appendpath
+prependpath '/sbin'
+prependpath '/bin'
+prependpath '/usr/sbin'
+prependpath '/usr/bin'
+prependpath '/usr/local/sbin'
+prependpath '/usr/local/bin'
+unset prependpath
 
 export PATH
 
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a049c59681d..0c517253b23 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=8
+revision=9
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

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

* Re: [PR PATCH] [Updated] base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
                   ` (3 preceding siblings ...)
  2019-10-26 14:52 ` voidlinux-github
@ 2019-10-29  6:37 ` voidlinux-github
  2019-10-29  6:37 ` voidlinux-github
  2020-01-12  0:23 ` [PR PATCH] [Closed]: " voidlinux-github
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-29  6:37 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages etc-profile
https://github.com/void-linux/void-packages/pull/15783

base-files: prefer /usr/local/bin to /usr/bin
Fix #15781

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

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

From 4f708ca261d9863e2ce0477ae4ed6fb06615b9bf Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 25 Oct 2019 10:30:37 +0700
Subject: [PATCH] base-files: prefer /usr/local/bin to /usr/bin

Fix #15781
---
 srcpkgs/base-files/files/profile | 23 +++++++----------------
 srcpkgs/base-files/template      |  2 +-
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566..9779832dd27 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -2,23 +2,14 @@
 
 # System wide environment and startup programs.
 
-appendpath () {
-    case ":$PATH:" in
-        *:"$1":*)
-            ;;
-        *)
-            PATH="${PATH:+$PATH:}$1"
-    esac
-}
-
 # Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
-appendpath '/usr/local/sbin'
-appendpath '/usr/local/bin'
-appendpath '/usr/bin'
-appendpath '/usr/sbin'
-appendpath '/sbin'
-appendpath '/bin'
-unset appendpath
+VOID_PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+case ":$PATH:" in
+	*:$VOID_PATH:*) ;;
+	*)
+		PATH="$VOID_PATH${PATH:+:$PATH}" ;;
+esac
+unset VOID_PATH
 
 export PATH
 
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a049c59681d..0c517253b23 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=8
+revision=9
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

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

* Re: [PR PATCH] [Updated] base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
                   ` (4 preceding siblings ...)
  2019-10-29  6:37 ` voidlinux-github
@ 2019-10-29  6:37 ` voidlinux-github
  2020-01-12  0:23 ` [PR PATCH] [Closed]: " voidlinux-github
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2019-10-29  6:37 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages etc-profile
https://github.com/void-linux/void-packages/pull/15783

base-files: prefer /usr/local/bin to /usr/bin
Fix #15781

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

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

From 4f708ca261d9863e2ce0477ae4ed6fb06615b9bf Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 25 Oct 2019 10:30:37 +0700
Subject: [PATCH] base-files: prefer /usr/local/bin to /usr/bin

Fix #15781
---
 srcpkgs/base-files/files/profile | 23 +++++++----------------
 srcpkgs/base-files/template      |  2 +-
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/base-files/files/profile b/srcpkgs/base-files/files/profile
index 947aeada566..9779832dd27 100644
--- a/srcpkgs/base-files/files/profile
+++ b/srcpkgs/base-files/files/profile
@@ -2,23 +2,14 @@
 
 # System wide environment and startup programs.
 
-appendpath () {
-    case ":$PATH:" in
-        *:"$1":*)
-            ;;
-        *)
-            PATH="${PATH:+$PATH:}$1"
-    esac
-}
-
 # Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
-appendpath '/usr/local/sbin'
-appendpath '/usr/local/bin'
-appendpath '/usr/bin'
-appendpath '/usr/sbin'
-appendpath '/sbin'
-appendpath '/bin'
-unset appendpath
+VOID_PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+case ":$PATH:" in
+	*:$VOID_PATH:*) ;;
+	*)
+		PATH="$VOID_PATH${PATH:+:$PATH}" ;;
+esac
+unset VOID_PATH
 
 export PATH
 
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index a049c59681d..0c517253b23 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.140
-revision=8
+revision=9
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"

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

* Re: [PR PATCH] [Closed]: base-files: prefer /usr/local/bin to /usr/bin
  2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
                   ` (5 preceding siblings ...)
  2019-10-29  6:37 ` voidlinux-github
@ 2020-01-12  0:23 ` voidlinux-github
  6 siblings, 0 replies; 8+ messages in thread
From: voidlinux-github @ 2020-01-12  0:23 UTC (permalink / raw)
  To: ml

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

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

base-files: prefer /usr/local/bin to /usr/bin
https://github.com/void-linux/void-packages/pull/15783

Description:
Fix #15781

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

end of thread, other threads:[~2020-01-12  0:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25  3:53 [PR PATCH] base-files: prefer /usr/local/bin to /usr/bin voidlinux-github
2019-10-25  7:41 ` voidlinux-github
2019-10-25  8:09 ` voidlinux-github
2019-10-26 14:52 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-26 14:52 ` voidlinux-github
2019-10-29  6:37 ` voidlinux-github
2019-10-29  6:37 ` voidlinux-github
2020-01-12  0:23 ` [PR PATCH] [Closed]: " voidlinux-github

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).