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 DDFBD138334 for ; Sat, 10 Aug 2019 19:12:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE9E0E0882; Sat, 10 Aug 2019 19:12:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 B2995E0882 for ; Sat, 10 Aug 2019 19:12:36 +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 870D7349854 for ; Sat, 10 Aug 2019 19:12:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D16C5471 for ; Sat, 10 Aug 2019 19:12:33 +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: <1565463071.03b441713d299a04c6bdba10e0fbd5ba2340a68d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 03b441713d299a04c6bdba10e0fbd5ba2340a68d X-VCS-Branch: master Date: Sat, 10 Aug 2019 19:12:33 +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: 1ed142ad-faa6-4e0b-a935-30f9bf9c25a3 X-Archives-Hash: 3be7612a552053644aba5b220babd6a0 commit: 03b441713d299a04c6bdba10e0fbd5ba2340a68d Author: Zac Medico gentoo org> AuthorDate: Sat Aug 10 18:44:11 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Aug 10 18:51:11 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=03b44171 bin/ebuild: Fix to work with installed package Fix the following AttributeError error: # ebuild /var/db/pkg/sys-apps/portage-2.3.71/portage-2.3.71.ebuild clean pretend clean Traceback (most recent call last): File "/usr/lib/python-exec/python3.6/ebuild", line 318, in type_name=pkg_type) File "/usr/lib64/python3.6/site-packages/_emerge/Package.py", line 72, in __init__ db = self.cpv._db AttributeError: 'str' object has no attribute '_db' Bug: https://bugs.gentoo.org/532674 Fixes: bfe7892202b8 ("_pkg_str: add _db attribute (bug 640318)") Signed-off-by: Zac Medico gentoo.org> bin/ebuild | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/ebuild b/bin/ebuild index baa842570..460aa0fd1 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -1,5 +1,5 @@ #!/usr/bin/python -b -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function @@ -312,6 +312,11 @@ except PortageKeyError: root_config = RootConfig(portage.settings, portage.db[portage.settings['EROOT']], None) +cpv = portage.versions._pkg_str(cpv, + metadata=metadata, + settings=portage.settings, + db=portage.db[portage.settings['EROOT']][mytree].dbapi) + pkg = Package(built=(pkg_type != "ebuild"), cpv=cpv, installed=(pkg_type=="installed"), metadata=metadata, root_config=root_config,