From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: modules/, /
Date: Tue, 9 Jan 2018 08:32:17 +0000 (UTC) [thread overview]
Message-ID: <1515485761.4bd139a86d73388dfdc6cbcf553f59b3ffa1138e.ulm@gentoo> (raw)
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
next reply other threads:[~2018-01-09 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 8:32 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-02 14:35 [gentoo-commits] proj/eselect:master commit in: modules/, / 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
2022-01-07 14:11 Ulrich Müller
2021-10-24 10:04 Ulrich Müller
2021-02-19 13:33 Ulrich Müller
2020-04-23 12:42 Ulrich Müller
2019-05-26 15:30 Ulrich Müller
2019-02-13 20:51 Ulrich Müller
2017-05-06 13:24 Ulrich Müller
2015-01-17 23:39 Ulrich Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515485761.4bd139a86d73388dfdc6cbcf553f59b3ffa1138e.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox