From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/
Date: Fri, 17 Aug 2018 23:13:37 +0000 (UTC) [thread overview]
Message-ID: <1534545609.836c5ba9352ef1fa2c14d29e8876533a9db72465.zmedico@gentoo> (raw)
commit: 836c5ba9352ef1fa2c14d29e8876533a9db72465
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 17 19:59:08 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> 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
next reply other threads:[~2018-08-17 23:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 23:13 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-05-20 19:47 [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/_config/ Zac Medico
2020-01-23 6:04 Zac Medico
2020-01-28 5:04 Zac Medico
2020-04-12 23:46 Zac Medico
2020-08-03 21:42 Zac Medico
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=1534545609.836c5ba9352ef1fa2c14d29e8876533a9db72465.zmedico@gentoo \
--to=zmedico@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