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 AC024138777 for ; Wed, 30 Jan 2013 20:16:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3586EE060F; Wed, 30 Jan 2013 20:16:29 +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 C9546E060F for ; Wed, 30 Jan 2013 20:16:28 +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 D577133DC07 for ; Wed, 30 Jan 2013 20:16:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 32DA3E4092 for ; Wed, 30 Jan 2013 20:16:25 +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: <1359576312.3b7a4c0fd1780614fce5285f0fcbeacab9899634.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ebuild/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/ebuild/creation.py X-VCS-Directories: roverlay/ebuild/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 3b7a4c0fd1780614fce5285f0fcbeacab9899634 X-VCS-Branch: master Date: Wed, 30 Jan 2013 20:16:25 +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: 670f854a-752a-4443-9cfd-f8a0d263c78d X-Archives-Hash: 31083cb703d04a5ed772ae0b21eeb858 commit: 3b7a4c0fd1780614fce5285f0fcbeacab9899634 Author: André Erdmann mailerd de> AuthorDate: Wed Jan 30 20:05:12 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Jan 30 20:05:12 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=3b7a4c0f ebuild/creation: use PackageInfo ebuild variables add evars from the PackageInfo instance to the ebuild if available --- roverlay/ebuild/creation.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/roverlay/ebuild/creation.py b/roverlay/ebuild/creation.py index 2f591a2..6c35bf7 100644 --- a/roverlay/ebuild/creation.py +++ b/roverlay/ebuild/creation.py @@ -16,6 +16,7 @@ import logging from roverlay.ebuild import depres, ebuilder, evars +EMPTY_ITERABLE = tuple() LOGGER = logging.getLogger ( 'EbuildCreation' ) @@ -114,6 +115,9 @@ class EbuildCreation ( object ): def _make_ebuild ( self ): """Tries to create ebuild data.""" + # TODO rewrite this function + # if overriding (R)DEPEND,IUSE vars is required + if self.package_info ['desc_data'] is None: self.logger.warning ( 'desc empty - cannot create an ebuild for this package.' @@ -132,6 +136,10 @@ class EbuildCreation ( object ): ebuild = ebuilder.Ebuilder() + ebuild.use ( *self.package_info.get ( 'EVAR', EMPTY_ITERABLE ) ) + #evars_overridden = tuple ( ebuild.get_names() ) + # if k.name not in evars_overridden: ebuild.use ( k ) + # add *DEPEND, IUSE to the ebuild ebuild.use ( *dep_result [1] )