diff --git a/modules/profile.eselect b/modules/profile.eselect index de85f90..c97fb23 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 experimental profile without --force" + fi elif [[ -n ${target} ]]; then # if the profile was explicitly specified (rather than a number) # double check and make sure it's valid