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 DE855138350 for ; Tue, 28 Jan 2020 05:04:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16CEEE07F2; Tue, 28 Jan 2020 05:04:05 +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 E9D0CE07F2 for ; Tue, 28 Jan 2020 05:04:04 +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 CCC3A34E4AA for ; Tue, 28 Jan 2020 05:04:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8F96F2A for ; Tue, 28 Jan 2020 05:04:01 +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: <1580187756.af5b57ee4d3133d9a8ca2c16aa21b7176026c8cd.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/KeywordsManager.py X-VCS-Directories: lib/portage/package/ebuild/_config/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: af5b57ee4d3133d9a8ca2c16aa21b7176026c8cd X-VCS-Branch: master Date: Tue, 28 Jan 2020 05:04:01 +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: b496435d-72ab-4d63-bda9-4b16aabc899a X-Archives-Hash: ca7bc2e2ba3c49dfdb9f1efa99db6b71 commit: af5b57ee4d3133d9a8ca2c16aa21b7176026c8cd Author: Zac Medico gentoo org> AuthorDate: Tue Jan 28 05:01:27 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jan 28 05:02:36 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=af5b57ee Suppress /etc/portage/package.keywords warning for API consumers Suggested-by: Jeroen Roovers gentoo.org> Bug: https://bugs.gentoo.org/706298 Signed-off-by: Zac Medico gentoo.org> lib/portage/package/ebuild/_config/KeywordsManager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/portage/package/ebuild/_config/KeywordsManager.py b/lib/portage/package/ebuild/_config/KeywordsManager.py index 1c12ce58e..48397b022 100644 --- a/lib/portage/package/ebuild/_config/KeywordsManager.py +++ b/lib/portage/package/ebuild/_config/KeywordsManager.py @@ -1,4 +1,4 @@ -# Copyright 2010-2014 Gentoo Foundation +# Copyright 2010-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 __all__ = ( @@ -8,6 +8,7 @@ __all__ = ( import warnings from _emerge.Package import Package +import portage from portage import os from portage.dep import ExtendedAtomDict, _repo_separator, _slot_separator from portage.localization import _ @@ -63,7 +64,7 @@ class KeywordsManager(object): recursive=1, allow_wildcard=True, allow_repo=True, verify_eapi=False, allow_build_id=True) - if pkgdict: + if pkgdict and portage._internal_caller: warnings.warn(_("%s is deprecated, use %s instead") % (user_kwrds_path, user_accept_kwrds_path), UserWarning)