diff options
author | Ulrich Müller <ulm@gentoo.org> | 2022-01-07 15:10:20 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2022-01-07 15:10:20 +0100 |
commit | de93ee70c59ad7207210f12b8238d87072054671 (patch) | |
tree | b7e7fa294b6eb7a64999dffb2443614f065da5df /modules | |
parent | Update version to 1.4.18 (diff) | |
download | eselect-de93ee70c59ad7207210f12b8238d87072054671.tar.gz eselect-de93ee70c59ad7207210f12b8238d87072054671.tar.bz2 eselect-de93ee70c59ad7207210f12b8238d87072054671.zip |
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@gentoo.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/profile.eselect | 5 |
1 files changed, 3 insertions, 2 deletions
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" |