public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2015-01-17 23:39 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2015-01-17 23:39 UTC (permalink / raw
  To: gentoo-commits

commit:     783374a7d24e310fcf0a49e16c10687bd515d66a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 17 16:55:46 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jan 17 16:55:46 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=783374a7

Be compatible with new OpenRC in rc module.

* modules/rc.eselect: Be compatible with new OpenRC, bug 536822.
(is_script): Test for "openrc-run" or "runscript" in shebang line.
(run_runscript): Omit the interpreter when executing the script.

---
 ChangeLog          | 6 ++++++
 modules/rc.eselect | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b27214b..01b8d14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-17  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/rc.eselect: Be compatible with new OpenRC, bug 536822.
+	(is_script): Test for "openrc-run" or "runscript" in shebang line.
+	(run_runscript): Omit the interpreter when executing the script.
+
 2014-09-01  Ulrich Müller  <ulm@gentoo.org>
 
 	* configure.ac: Update version to 1.4.3.

diff --git a/modules/rc.eselect b/modules/rc.eselect
index 82eb6ef..2a9bf5b 100644
--- a/modules/rc.eselect
+++ b/modules/rc.eselect
@@ -37,7 +37,7 @@ is_script() {
 		&& ${file%%.sh} = ${file} \
 		&& ${file%%\~} = ${file} \
 		&& -e ${file} ]] \
-		&& grep "^#\!/sbin/runscript" "${file}" &>/dev/null
+		&& grep '^#!.*/\(runscript\|openrc-run\)' "${file}" &>/dev/null
 }
 
 # find_scripts PRIVATE
@@ -92,7 +92,7 @@ run_runscript() {
 	shift
 	for script; do
 		is_script "${EROOT}/etc/init.d/${script}" \
-			&& /sbin/runscript "${EROOT}/etc/init.d/${script}" "${command}"
+			&& "${EROOT}/etc/init.d/${script}" "${command}"
 	done
 }
 


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2017-05-06 13:24 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2017-05-06 13:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2c5554fe64ace6f8cb082b6bd442e13dc3999c0c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 12:43:47 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat May  6 12:43:47 2017 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=2c5554fe

Check range of number in kernel and profile modules.

* modules/kernel.eselect (set_symlink):
* modules/profile.eselect (set_symlink): Check range of number,
bug 617572. Thanks to Takuto Yoshida <otakuto.gentoo <AT> gmail.com>.

 ChangeLog               | 6 ++++++
 modules/kernel.eselect  | 2 ++
 modules/profile.eselect | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 4bd53b9..2b356bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-06  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/kernel.eselect (set_symlink):
+	* modules/profile.eselect (set_symlink): Check range of number,
+	bug 617572. Thanks to Takuto Yoshida <otakuto.gentoo@gmail.com>.
+
 2017-03-22  Ulrich Müller  <ulm@gentoo.org>
 
 	* configure.ac: Update version to 1.4.9.

diff --git a/modules/kernel.eselect b/modules/kernel.eselect
index 3104a98..e76c143 100644
--- a/modules/kernel.eselect
+++ b/modules/kernel.eselect
@@ -44,6 +44,8 @@ set_symlink() {
 
 	if is_number "${target}"; then
 		local targets=( $(find_targets) )
+		[[ ${target} -ge 1 && ${target} -le ${#targets[@]} ]] \
+			|| die -q "Number out of range: $1"
 		target=${targets[target-1]}
 	fi
 

diff --git a/modules/profile.eselect b/modules/profile.eselect
index 68d9b8a..8d95c01 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -80,6 +80,8 @@ set_symlink() {
 		targets=( $(find_targets) )
 		[[ ${#targets[@]} -eq 0 ]] \
 			&& die -q "Failed to get a list of valid profiles"
+		[[ ${target} -ge 1 && ${target} -le ${#targets[@]} ]] \
+			|| die -q "Number out of range: $1"
 		target=${targets[target-1]}
 		repo=${target%%::*}; target=${target#*::}
 		repopath=${target%%::*}; target=${target#*::}


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2018-01-09  8:32 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2018-01-09  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     4bd139a86d73388dfdc6cbcf553f59b3ffa1138e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  9 08:16:01 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 08:16:01 2018 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=4bd139a8

Require --force option when selecting an experimental profile.

* modules/profile.eselect (set_symlink): Require --force option
when selecting an experimental profile.

 ChangeLog               | 5 +++++
 modules/profile.eselect | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 57e768e..0be1bc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-09  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/profile.eselect (set_symlink): Require --force option
+	when selecting an experimental profile.
+
 2018-01-08  Ulrich Müller  <ulm@gentoo.org>
 
 	* modules/profile.eselect (find_targets): Add a fourth field for

diff --git a/modules/profile.eselect b/modules/profile.eselect
index de85f90..1e1dcff 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -75,7 +75,7 @@ remove_symlink() {
 
 # set the make.profile symlink
 set_symlink() {
-	local target=$1 force=$2 targets arch parch repo repopath
+	local target=$1 force=$2 targets arch parch repo repopath status
 
 	if is_number "${target}"; then
 		targets=( $(find_targets) )
@@ -86,7 +86,12 @@ set_symlink() {
 		target=${targets[target-1]}
 		repo=${target%%::*}; target=${target#*::}
 		repopath=${target%%::*}; target=${target#*::}
+		status=${target#*::}; status=${status%%::*}
 		target=${target%%::*}
+		if [[ ${status} == exp && -z ${force} ]]; then
+			write_error_msg "Profile ${target} is experimental"
+			die -q "Refusing to select ${status} profile without --force option"
+		fi
 	elif [[ -n ${target} ]]; then
 		# if the profile was explicitly specified (rather than a number)
 		# double check and make sure it's valid


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2019-02-13 20:51 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2019-02-13 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     bbfcc313401c27755a2832c100ad20772bad586c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 13 20:39:26 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 13 20:39:26 2019 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=bbfcc313

Warn about deprecated profiles.

* modules/profile.eselect (set_symlink): Warn about deprecated
profiles, bug 673568.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog               | 5 +++++
 modules/profile.eselect | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 8a3eb59..84673d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-22  Ulrich Mueller  <ulm@gentoo.org>
+
+	* modules/profile.eselect (set_symlink): Warn about deprecated
+	profiles, bug 673568.
+
 2018-08-07  Ulrich Müller  <ulm@gentoo.org>
 
 	* man/profile.eselect.5: Update examples, bug 662996.

diff --git a/modules/profile.eselect b/modules/profile.eselect
index b88cc2b..68b0826 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -116,6 +116,13 @@ set_symlink() {
 	[[ ! -d ${repopath}/profiles/${target} ]] \
 		&& die -q "No profile directory for target \"${target}\""
 
+	if [[ -f ${repopath}/profiles/${target}/deprecated ]]; then
+		local upgrade=$(sed 1q "${repopath}/profiles/${target}/deprecated")
+		write_warning_msg "Profile ${target} is deprecated"
+		[[ -n ${upgrade} ]] \
+			&& write_warning_msg "Recommending upgrade to ${upgrade}"
+	fi
+
 	# we must call remove_symlink() here instead of calling it from
 	# do_set(), since if the link is removed, we cannot reliably
 	# determine ${arch} in find_targets()


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2019-05-26 15:30 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2019-05-26 15:30 UTC (permalink / raw
  To: gentoo-commits

commit:     61cb8c82e0ecb918b84a5ecdd7bf2f574bfe5212
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 15:13:43 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May 26 15:13:43 2019 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=61cb8c82

Allow specification of news item by its name.

* modules/news.eselect (do_read, do_unread): Allow specification
of item by its number or name.
(describe_read_options, describe_unread_options): Document it.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog            |  6 ++++++
 modules/news.eselect | 42 ++++++++++++++++++++++++++++++++----------
 2 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 20ecfab..bc42d2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-26  Ulrich Mueller  <ulm@gentoo.org>
+
+	* modules/news.eselect (do_read, do_unread): Allow specification
+	of item by its number or name.
+	(describe_read_options, describe_unread_options): Document it.
+
 2019-02-17  Ulrich Mueller  <ulm@gentoo.org>
 
 	* configure.ac: Update version to 1.4.14.

diff --git a/modules/news.eselect b/modules/news.eselect
index 5f3303b..15e5cb6 100644
--- a/modules/news.eselect
+++ b/modules/news.eselect
@@ -251,7 +251,7 @@ describe_read_options() {
 	echo "--raw : Output in raw format"
 	echo "new : Read unread news items (default)"
 	echo "all : Read all news items"
-	echo "item : Number of item (from 'list' action)"
+	echo "item : Item name or number (from 'list' action)"
 }
 
 describe_read_parameters() {
@@ -285,10 +285,21 @@ do_read() {
 	fi
 
 	for i; do
-		if ! is_number "${i}" || [[ ${i} -lt 1 || ${i} -gt ${#items[@]} ]]
-		then
-			write_warning_msg "Bad item number: ${i}"
-			continue
+		if is_number "${i}"; then
+			if (( i < 1 || i > n )); then
+				write_warning_msg "Bad item number: ${i}"
+				continue
+			fi
+		else
+			# item can be specified by name
+			item=${i}
+			for (( i = 1; i <= n; i++ )); do
+				[[ ${items[i-1]#*/*/} = "${item}" ]] && break
+			done
+			if (( i > n )); then
+				write_warning_msg "Item not found: ${item}"
+				continue
+			fi
 		fi
 		item=${items[--i]}
 		stat=${item%%/*}; item=${item#*/}
@@ -373,7 +384,7 @@ describe_unread() {
 
 describe_unread_options() {
 	echo "all : Mark all news items as unread"
-	echo "item : Number of item (from 'list' action)"
+	echo "item : Item name or number (from 'list' action)"
 }
 
 describe_unread_parameters() {
@@ -393,10 +404,21 @@ do_unread() {
 	fi
 
 	for i; do
-		if ! is_number "${i}" || [[ ${i} -lt 1 || ${i} -gt ${#items[@]} ]]
-		then
-			write_warning_msg "Bad item number: ${i}"
-			continue
+		if is_number "${i}"; then
+			if (( i < 1 || i > n )); then
+				write_warning_msg "Bad item number: ${i}"
+				continue
+			fi
+		else
+			# item can be specified by name
+			item=${i}
+			for (( i = 1; i <= n; i++ )); do
+				[[ ${items[i-1]#*/*/} = "${item}" ]] && break
+			done
+			if (( i > n )); then
+				write_warning_msg "Item not found: ${item}"
+				continue
+			fi
 		fi
 		item=${items[--i]}
 		stat=${item%%/*}; item=${item#*/}


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2020-04-23 12:42 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2020-04-23 12:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e757ab1145cc4c6ce7b2c2005220ae59792e218e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 12:40:28 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 12:40:28 2020 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e757ab11

rc.eselect: Test for regular file.

* modules/rc.eselect (is_script): Test whether the script is a
regular file, bug 718920.

Bug: https://bugs.gentoo.org/718920
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog          | 5 +++++
 modules/rc.eselect | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 86ffd88..d037d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-23  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/rc.eselect (is_script): Test whether the script is a
+	regular file, bug 718920.
+
 2019-11-28  Ulrich Müller  <ulm@gentoo.org>
 
 	* configure.ac: Update version to 1.4.16.

diff --git a/modules/rc.eselect b/modules/rc.eselect
index 4a3c16d..a606cfa 100644
--- a/modules/rc.eselect
+++ b/modules/rc.eselect
@@ -35,6 +35,7 @@ is_script() {
 	[[ -n ${file} \
 			 && ${file%%.sh} = "${file}" \
 			 && ${file%%\~} = "${file}" \
+			 && -f ${file} \
 			 && -x ${file} ]] \
 		&& read line <"${file}" \
 		&& [[ ${line} =~ ^#!.*(runscript|openrc-run) ]]


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2021-02-19 13:33 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2021-02-19 13:33 UTC (permalink / raw
  To: gentoo-commits

commit:     74aa11482d3ab7cdbe44b85027e5b8c20ce82bb4
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 19 13:31:07 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 19 13:31:07 2021 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=74aa1148

news.eselect: Support "new" and "all" options in list action

* modules/news.eselect (do_list): Recognise "new" and "all"
options, bug 771075.
(describe_list_options): New function.

Bug: https://bugs.gentoo.org/771075
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog            |  6 ++++++
 modules/news.eselect | 21 +++++++++++++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 90109e8..dfdfe47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-17  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/news.eselect (do_list): Recognise "new" and "all"
+	options, bug 771075.
+	(describe_list_options): New function.
+
 2020-12-18  Ulrich Müller  <ulm@gentoo.org>
 
 	* configure.ac (REALPATH, READLINK): Prefer realpath to readlink,

diff --git a/modules/news.eselect b/modules/news.eselect
index f941a8c..5125431 100644
--- a/modules/news.eselect
+++ b/modules/news.eselect
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 2005-2020 Gentoo Authors
+# Copyright 2005-2021 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 
 inherit package-manager
@@ -171,16 +171,30 @@ describe_list() {
 	echo "List news items"
 }
 
+describe_list_options() {
+	echo "new : List unread news items"
+	echo "all : List all news items (default)"
+}
+
 do_list() {
-	local item stat repo dir header line format title posted i=1
+	local item stat repo dir header line format title posted unread i=0 n=0
 	local cols=${COLUMNS:-80} ifs_save=${IFS}
 	local -a repos dirs
 
+	case $1 in
+		new) unread=1 ;;
+		all|"") ;;
+		*) write_warning_msg "Bad option: $1" ;;
+	esac
+
 	set -- $(find_items unread read)
 	write_list_start "News items:"
 	for item; do
+		(( i++ ))
 		stat=${item%%/*}; item=${item#*/}
 		repo=${item%%/*}; item=${item#*/}
+		[[ ! ${unread} || ${stat} = unread ]] || continue
+		(( n++ ))
 		find_repo_dir "${repo}"
 		title="(${item} - no title)"
 		posted=${item:0:10}
@@ -215,9 +229,8 @@ do_list() {
 		else
 			write_numbered_list_entry ${i} "   ${line}"
 		fi
-		(( i++ ))
 	done
-	[[ $# -eq 0 ]] && ! is_output_mode brief \
+	[[ ${n} -eq 0 ]] && ! is_output_mode brief \
 		&& write_kv_list_entry "(none found)" ""
 }
 


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2021-10-24 10:04 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2021-10-24 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     612152aacc400899dcb4d42f2c75acd63ae75033
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 24 10:03:31 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 24 10:03:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=612152aa

Don't use absolute paths in visual module

* modules/visual.eselect (EDITOR_LIST): Don't use absolute paths.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog              | 4 ++++
 modules/visual.eselect | 7 ++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f2ea0b6..dc70d61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-10-24  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/visual.eselect (EDITOR_LIST): Don't use absolute paths.
+
 2021-08-24  Ulrich Müller  <ulm@gentoo.org>
 
 	* libs/package-manager.bash.in (arch): Recognise loongarch*/loong.

diff --git a/modules/visual.eselect b/modules/visual.eselect
index 00cd835..527793e 100644
--- a/modules/visual.eselect
+++ b/modules/visual.eselect
@@ -1,14 +1,11 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 2009-2020 Gentoo Authors
+# Copyright 2009-2021 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 
 EDITOR_VAR="VISUAL"
 EDITOR_ENVFILE="/etc/env.d/99editor"
 # list of most common cases only
-EDITOR_LIST="/bin/nano
-	/usr/bin/emacs
-	/usr/bin/vi
-	/usr/bin/xemacs"
+EDITOR_LIST="nano emacs vi xemacs"
 
 inherit editor-variable
 


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
@ 2022-01-07 14:11 Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2022-01-07 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     de93ee70c59ad7207210f12b8238d87072054671
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  7 14:10:20 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Jan  7 14:10:20 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=de93ee70

Fix canonicalise call in profile module

* modules/profile.eselect (set_symlink): Don't call canonicalise
with an empty argument, bug 830707.

Bug: https://bugs.gentoo.org/830707
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog               | 5 +++++
 modules/profile.eselect | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 668b7e8..2a8be3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-07  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/profile.eselect (set_symlink): Don't call canonicalise
+	with an empty argument, bug 830707.
+
 2021-12-28  Ulrich Müller  <ulm@gentoo.org>
 
 	* configure.ac: Update version to 1.4.18.

diff --git a/modules/profile.eselect b/modules/profile.eselect
index 3b87441..f33f8d1 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 2005-2020 Gentoo Authors
+# Copyright 2005-2022 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 
 # This is a portage-only module.
@@ -137,7 +137,8 @@ set_symlink() {
 		"${MAKE_PROFILE}" \
 		|| die -q "Couldn't set new ${MAKE_PROFILE} symlink"
 	# check if the resulting symlink is sane
-	[[ $(canonicalise "${MAKE_PROFILE}") != "$(canonicalise "${EROOT}")"/* ]] \
+	local eroot=$(canonicalise "${EROOT:-/}")
+	[[ $(canonicalise "${MAKE_PROFILE}") != "${eroot%/}"/* ]] \
 		&& [[ -z ${force} ]] \
 		&& write_warning_msg "Strange path. Check ${MAKE_PROFILE} symlink"
 


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

* [gentoo-commits] proj/eselect:master commit in: modules/, /
  2023-09-09 19:00 [gentoo-commits] proj/eselect:bug643864 " Ulrich Müller
@ 2023-09-11 16:32 ` Ulrich Müller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Müller @ 2023-09-11 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     e1a72cd47678d5202d2c7959ca6784462590c9fa
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  9 12:33:56 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 18:55:45 2023 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e1a72cd4

Display only a warning when selecting an experimental profile

* modules/profile.eselect (set_symlink): Selecting an experimental
profile without --force is no longer a fatal error. Bug 913480.

Bug: https://bugs.gentoo.org/913480
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog               | 5 +++++
 modules/profile.eselect | 8 +++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f9ee3f7..71ce655 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-09-09  Ulrich Müller  <ulm@gentoo.org>
+
+	* modules/profile.eselect (set_symlink): Selecting an experimental
+	profile without --force is no longer a fatal error. Bug 913480.
+
 2023-08-24  Ulrich Müller  <ulm@gentoo.org>
 
 	* misc/eselect-mode.el: Enable lexical binding.

diff --git a/modules/profile.eselect b/modules/profile.eselect
index f33f8d1..31b2c6a 100644
--- a/modules/profile.eselect
+++ b/modules/profile.eselect
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 2005-2022 Gentoo Authors
+# Copyright 2005-2023 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 
 # This is a portage-only module.
@@ -88,10 +88,8 @@ set_symlink() {
 		repopath=${target%%::*}; target=${target#*::}
 		status=${target#*::}; status=${status%%::*}
 		target=${target%%::*}
-		if [[ ${status} == exp && -z ${force} ]]; then
-			write_error_msg "Profile ${target} is experimental"
-			die -q "Refusing to select ${status} profile without --force option"
-		fi
+		[[ ${status} == exp ]] \
+			&& write_warning_msg "Profile ${target} is experimental"
 	elif [[ -n ${target} ]]; then
 		# if the profile was explicitly specified (rather than a number)
 		# double check and make sure it's valid


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

end of thread, other threads:[~2023-09-11 16:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-17 23:39 [gentoo-commits] proj/eselect:master commit in: modules/, / Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2017-05-06 13:24 Ulrich Müller
2018-01-09  8:32 Ulrich Müller
2019-02-13 20:51 Ulrich Müller
2019-05-26 15:30 Ulrich Müller
2020-04-23 12:42 Ulrich Müller
2021-02-19 13:33 Ulrich Müller
2021-10-24 10:04 Ulrich Müller
2022-01-07 14:11 Ulrich Müller
2023-09-09 19:00 [gentoo-commits] proj/eselect:bug643864 " Ulrich Müller
2023-09-11 16:32 ` [gentoo-commits] proj/eselect:master " Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox