From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C849313800E for ; Tue, 7 Aug 2012 00:10:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73223E07BD; Tue, 7 Aug 2012 00:10:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 438B7E07BD for ; Tue, 7 Aug 2012 00:10:45 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7BA141B4020 for ; Tue, 7 Aug 2012 00:10:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 56B5FE5439 for ; Tue, 7 Aug 2012 00:10:42 +0000 (UTC) From: "Slava Bacherikov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Slava Bacherikov" Message-ID: <1344263279.21a8e669ca68eca68e0956f8f3f89728aff9f31e.bacher09@gentoo> Subject: [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/libs/package_info/package_backends/ X-VCS-Repository: proj/gentoo-packages X-VCS-Files: gpackages/libs/package_info/package_backends/pkgcore.py gpackages/libs/package_info/package_backends/portage.py X-VCS-Directories: gpackages/libs/package_info/package_backends/ X-VCS-Committer: bacher09 X-VCS-Committer-Name: Slava Bacherikov X-VCS-Revision: 21a8e669ca68eca68e0956f8f3f89728aff9f31e X-VCS-Branch: master Date: Tue, 7 Aug 2012 00:10:42 +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: 78953b4c-4799-497f-983d-23a9213f992c X-Archives-Hash: c2726841317476ebc2dc96b6f1367806 commit: 21a8e669ca68eca68e0956f8f3f89728aff9f31e Author: Slava Bacherikov bacher09 org> AuthorDate: Mon Aug 6 14:27:59 2012 +0000 Commit: Slava Bacherikov bacherikov org ua> CommitDate: Mon Aug 6 14:27:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-packages.git;a=commit;h=21a8e669 Add properties for access to info about depends --- .../libs/package_info/package_backends/pkgcore.py | 12 ++++++++++++ .../libs/package_info/package_backends/portage.py | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gpackages/libs/package_info/package_backends/pkgcore.py b/gpackages/libs/package_info/package_backends/pkgcore.py index 2ad6b69..f84a712 100644 --- a/gpackages/libs/package_info/package_backends/pkgcore.py +++ b/gpackages/libs/package_info/package_backends/pkgcore.py @@ -201,3 +201,15 @@ class Ebuild(EbuildMixin): def is_hard_masked(self): return self.package_obj.category_obj._repo_obj. \ porttree.is_masked(self._ebuild) + + @property + def depends(self): + return str(self._ebuild.depends) + + @property + def rdepends(self): + return str(self._ebuild.rdepends) + + @property + def pdepends(self): + return str(self._ebuild.post_rdepends) diff --git a/gpackages/libs/package_info/package_backends/portage.py b/gpackages/libs/package_info/package_backends/portage.py index e3707d4..f707fe9 100644 --- a/gpackages/libs/package_info/package_backends/portage.py +++ b/gpackages/libs/package_info/package_backends/portage.py @@ -154,8 +154,8 @@ class Ebuild(EbuildMixin): __slots__ = ('package', 'ebuild', 'cpv_object', '_cache', '_env', '_is_valid') - ENV_NEED = set(['KEYWORDS', 'HOMEPAGE', 'LICENSE', - 'DESCRIPTION', 'EAPI', 'SLOT']) + ENV_NEED = set(['KEYWORDS', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION', 'EAPI', + 'SLOT', 'DEPEND', 'RDEPEND', 'PDEPEND']) ENV_VARS = PORTDB._aux_cache_keys | ENV_NEED @@ -192,6 +192,18 @@ class Ebuild(EbuildMixin): return self._env.get("KEYWORDS") @property + def depends(self): + return self._env.get("DEPEND") + + @property + def rdepends(self): + return self._env.get("RDEPEND") + + @property + def pdepends(self): + return self._env.get("PDEPEND") + + @property def is_valid(self): "Check if ebuild is valid" return self._is_valid