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 55899138200 for ; Fri, 23 Aug 2013 13:52:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD7E5E0C29; Fri, 23 Aug 2013 13:52:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A100E0C29 for ; Fri, 23 Aug 2013 13:52:06 +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 0E7C333ECBA for ; Fri, 23 Aug 2013 13:52:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 08742E547E for ; Fri, 23 Aug 2013 13:52:03 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1377265306.11b56c2339c86c3906a5e4fb3cc163eb0dbf18ae.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ebuild/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/ebuild/depres.py X-VCS-Directories: roverlay/ebuild/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 11b56c2339c86c3906a5e4fb3cc163eb0dbf18ae X-VCS-Branch: master Date: Fri, 23 Aug 2013 13:52:03 +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: c29a47b1-ed63-4b16-b278-be574a3a373a X-Archives-Hash: 1b5e1d08bcad0344b1eec6d409764fd8 commit: 11b56c2339c86c3906a5e4fb3cc163eb0dbf18ae Author: André Erdmann mailerd de> AuthorDate: Fri Aug 23 13:41:46 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Aug 23 13:41:46 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=11b56c23 ebuild creation, depres: add injected deps This commit (finally) allows to insert additional dependencies via package rules. package rule example: MATCH: any ACTION: add DEPEND sci-libs/fftw add RDEPEND virtual/jdk dev-lang/perl END; --- roverlay/ebuild/depres.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/roverlay/ebuild/depres.py b/roverlay/ebuild/depres.py index e972eb3..fa3a5bb 100644 --- a/roverlay/ebuild/depres.py +++ b/roverlay/ebuild/depres.py @@ -265,7 +265,8 @@ class EbuildDepRes ( object ): """Make evars using the depres result.""" # => - depmap = dict() + depmap = dict() + depconf = self.package_info.depconf unresolvable_optional_deps = set() for dep_type, channel in self._channels.items(): @@ -284,6 +285,22 @@ class EbuildDepRes ( object ): self._close_channels() + # add injected deps + if depconf and 'extra' in depconf: + for dep_type, depset in depconf ['extra'].items(): + self.logger.debug ( + "adding extra deps {deps} to {depvar}".format ( + deps=depset, depvar=dep_type + ) + ) + + if dep_type not in depmap: + depmap [dep_type] = depset + else: + depmap [dep_type] |= depset + # -- end if depconf->extra + + # remove redundant deps (DEPEND in RDEPEND, RDEPEND,DEPEND in R_SUGGESTS) if 'RDEPEND' in depmap and 'DEPEND' in depmap: depmap ['RDEPEND'] -= depmap ['DEPEND'] @@ -346,8 +363,8 @@ class EbuildDepRes ( object ): if 'DEPEND' in depmap: evar_list.append ( EBUILDVARS ['DEPEND'] ( - #DepResultIterator ( depmap ['DEPEND'] ), - depmap ['DEPEND'], + DepResultIterator ( depmap ['DEPEND'] ), + #depmap ['DEPEND'], using_suggests=has_suggests, use_expand=True ) ) @@ -355,8 +372,8 @@ class EbuildDepRes ( object ): if 'RDEPEND' in depmap: evar_list.append ( EBUILDVARS ['RDEPEND'] ( - #DepResultIterator ( depmap ['RDEPEND'] ), - depmap ['RDEPEND'], + DepResultIterator ( depmap ['RDEPEND'] ), + #depmap ['RDEPEND'], using_suggests=has_suggests, use_expand=True ) )