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 D3F53139694 for ; Fri, 5 May 2017 19:38:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 156E121C038; Fri, 5 May 2017 19:38:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7F0F21C038 for ; Fri, 5 May 2017 19:38:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 1078D3416BF for ; Fri, 5 May 2017 19:38:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CC87744A for ; Fri, 5 May 2017 19:38:07 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1494012685.d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/revdep_rebuild/settings.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9 X-VCS-Branch: master Date: Fri, 5 May 2017 19:38:07 +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: 2b6c0646-dafc-48fb-8932-806c73a2090e X-Archives-Hash: 99950c314ab16af5d49b387f79b7c36d commit: d3ef9ef1bebc7604db0e8c5c49e167e18300c9e9 Author: Paul Varner gentoo org> AuthorDate: Fri May 5 19:31:25 2017 +0000 Commit: Paul Varner gentoo 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 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,