From: "Paul Varner" <fuzzyray@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/
Date: Fri, 5 May 2017 19:38:07 +0000 (UTC) [thread overview]
Message-ID: <1494012685.d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9.fuzzyray@gentoo> (raw)
commit: d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Fri May 5 19:31:25 2017 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Fri May 5 19:31:25 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=d3ef9ef1
revdep_rebuild/settings.py: Fix traceback error with Python3.6 (bug 617498)
The portage.root variable is using late binding. This breaks in Python3.6
where the type is being checked before use in os.path.join(). This fix
creates a new variable of the correct type from the value of portage.root
instead of using portage.root directly.
X-Gentoo-bug: 617498
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=617498
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
pym/gentoolkit/revdep_rebuild/settings.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py
index 589ea29..9a00f45 100644
--- a/pym/gentoolkit/revdep_rebuild/settings.py
+++ b/pym/gentoolkit/revdep_rebuild/settings.py
@@ -15,12 +15,19 @@ import glob
import portage
from portage import _encodings, _unicode_decode, _unicode_encode
+if sys.version_info[0] >= 3:
+ _unicode = str
+else:
+ _unicode = unicode
+
+portage_root = _unicode(portage.root)
+
DEFAULTS = {
- 'DEFAULT_LD_FILE': os.path.join(portage.root, 'etc/ld.so.conf'),
- 'DEFAULT_ENV_FILE': os.path.join(portage.root, 'etc/profile.env'),
- 'REVDEP_CONFDIR': os.path.join(portage.root, 'etc/revdep-rebuild/'),
- 'PKG_DIR': os.path.join(portage.root, 'var/db/pkg/'),
- 'DEFAULT_TMP_DIR': os.path.join(portage.root, '/tmp/revdep-rebuild' if os.getgid() else '/var/cache/revdep-rebuild'), #cache default location
+ 'DEFAULT_LD_FILE': os.path.join(portage_root, 'etc/ld.so.conf'),
+ 'DEFAULT_ENV_FILE': os.path.join(portage_root, 'etc/profile.env'),
+ 'REVDEP_CONFDIR': os.path.join(portage_root, 'etc/revdep-rebuild/'),
+ 'PKG_DIR': os.path.join(portage_root, 'var/db/pkg/'),
+ 'DEFAULT_TMP_DIR': os.path.join(portage_root, '/tmp/revdep-rebuild' if os.getgid() else '/var/cache/revdep-rebuild'), #cache default location
# number of maximum allowed files to be parsed at once
'CMD_MAX_ARGS': 1000,
next reply other threads:[~2017-05-05 19:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 19:38 Paul Varner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-09 1:49 [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ Mike Gilbert
2020-02-14 18:13 Zac Medico
2019-08-19 3:41 Zac Medico
2019-08-19 3:41 Zac Medico
2017-03-10 17:31 Zac Medico
2016-12-29 21:36 Jason Donenfeld
2016-09-15 15:05 Brian Dolbec
2016-09-15 15:05 Brian Dolbec
2016-08-15 21:06 Paul Varner
2016-06-09 19:38 Slawek Lis
2016-05-18 15:41 Brian Dolbec
2016-05-18 15:41 Brian Dolbec
2016-05-18 15:14 Brian Dolbec
2016-05-18 6:10 Brian Dolbec
2016-02-25 21:26 Brian Dolbec
2016-01-18 0:00 Jason Donenfeld
2015-12-20 2:05 Brian Dolbec
2015-12-16 17:53 Brian Dolbec
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=1494012685.d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9.fuzzyray@gentoo \
--to=fuzzyray@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