From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ABBE9158086 for ; Fri, 7 Jan 2022 14:11:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 046ABE03DF; Fri, 7 Jan 2022 14:11:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C8D36E03DF for ; Fri, 7 Jan 2022 14:11:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 958E7342E83 for ; Fri, 7 Jan 2022 14:11:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CB80B232 for ; Fri, 7 Jan 2022 14:11:35 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1641564620.de93ee70c59ad7207210f12b8238d87072054671.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: modules/, / X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog modules/profile.eselect X-VCS-Directories: modules/ / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: de93ee70c59ad7207210f12b8238d87072054671 X-VCS-Branch: master Date: Fri, 7 Jan 2022 14:11:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 96555c69-f705-4507-8c65-1853cae2e598 X-Archives-Hash: ba835d834f1f86babc34beb13787576d commit: de93ee70c59ad7207210f12b8238d87072054671 Author: Ulrich Müller gentoo org> AuthorDate: Fri Jan 7 14:10:20 2022 +0000 Commit: Ulrich Müller gentoo 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 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 + + * modules/profile.eselect (set_symlink): Don't call canonicalise + with an empty argument, bug 830707. + 2021-12-28 Ulrich Müller * 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"