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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1B713138334 for ; Fri, 17 Aug 2018 23:13:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7E31E0819; Fri, 17 Aug 2018 23:13:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D077E0819 for ; Fri, 17 Aug 2018 23:13:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 726EB335D6B for ; Fri, 17 Aug 2018 23:13:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AEF8A36A for ; Fri, 17 Aug 2018 23:13:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1534545609.836c5ba9352ef1fa2c14d29e8876533a9db72465.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/_config/LocationsManager.py X-VCS-Directories: lib/portage/package/ebuild/_config/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 836c5ba9352ef1fa2c14d29e8876533a9db72465 X-VCS-Branch: master Date: Fri, 17 Aug 2018 23:13:37 +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-Archives-Salt: d3083852-4b95-44f3-8b73-c9bcfb695fc2 X-Archives-Hash: 7f6e339058717e39b43591a784031011 commit: 836c5ba9352ef1fa2c14d29e8876533a9db72465 Author: Zac Medico gentoo org> AuthorDate: Fri Aug 17 19:59:08 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Aug 17 22:40:09 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=836c5ba9 LocationsManager: map empty root var to / (bug 663904) When ROOT or PORTAGE_CONFIGROOT is entirely empty, map the value to / since otherwise is becomes the current working directory which gives undesirable results. Bug: https://bugs.gentoo.org/663904 lib/portage/package/ebuild/_config/LocationsManager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/portage/package/ebuild/_config/LocationsManager.py b/lib/portage/package/ebuild/_config/LocationsManager.py index f7d7209ff..75320258f 100644 --- a/lib/portage/package/ebuild/_config/LocationsManager.py +++ b/lib/portage/package/ebuild/_config/LocationsManager.py @@ -60,7 +60,7 @@ class LocationsManager(object): self.config_root = portage.const.EPREFIX + os.sep self.config_root = normalize_path(os.path.abspath( - self.config_root)).rstrip(os.path.sep) + os.path.sep + self.config_root or os.sep)).rstrip(os.sep) + os.sep self._check_var_directory("PORTAGE_CONFIGROOT", self.config_root) self.abs_user_config = os.path.join(self.config_root, USER_CONFIG_PATH) @@ -304,8 +304,7 @@ class LocationsManager(object): self.target_root = root_overwrite if not self.target_root.strip(): self.target_root = None - if self.target_root is None: - self.target_root = "/" + self.target_root = self.target_root or os.sep self.target_root = normalize_path(os.path.abspath( self.target_root)).rstrip(os.path.sep) + os.path.sep