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 5EAEE1392EF for ; Tue, 8 Jul 2014 16:58:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FC76E08DA; Tue, 8 Jul 2014 16:58:23 +0000 (UTC) Received: from email.aon.at (smtpout01.highway.telekom.at [195.3.96.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 27E0FE08D5 for ; Tue, 8 Jul 2014 16:58:21 +0000 (UTC) Received: (qmail 20464 invoked from network); 8 Jul 2014 16:58:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on WARSBL504.highway.telekom.at X-Spam-Level: Received: from 62-46-137-20.adsl.highway.telekom.at (HELO [10.0.0.2]) ([62.46.137.20]) (envelope-sender ) by smarthub76.res.a1.net (qmail-ldap-1.03) with SMTP; 8 Jul 2014 16:58:20 -0000 X-A1Mail-Track-Id: 1404838699:20386:smarthub76:62.46.137.20:1 Message-ID: <53BC232B.30602@gentoo.org> Date: Tue, 08 Jul 2014 18:58:19 +0200 From: Michael Haubenwallner User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] support multiple eclass variants (aka "unstable eclasses") Content-Type: multipart/mixed; boundary="------------090109080100050709090006" X-Archives-Salt: e44dd333-365f-48d6-8533-8e7eea223f1f X-Archives-Hash: ac67ed7de00e2547fc98f18e0365c38f This is a multi-part message in MIME format. --------------090109080100050709090006 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Hello fellow Portage developers, attached portage patch draft aims to allow for easy distributing eclasses to be tested by multiple tinderboxes on various architectures, without being active for normal installs. Usage is to have in make.conf (or profile): PORTAGE_ECLASS_VARIANTS="testing" and for the eclass: to live in tree-or-overlay/eclass/testing/ Thoughts? (even for var-naming, manpage yes/no/wording, ...) Thank you! /haubi/ --------------090109080100050709090006 Content-Type: text/x-patch; name="0001-support-PORTAGE_ECLASS_VARIANTS.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-support-PORTAGE_ECLASS_VARIANTS.patch" >From 2ddc1db0f1c15873e2476fbf5ba0352464c8725a Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 8 Jul 2014 17:48:54 +0200 Subject: [PATCH] support PORTAGE_ECLASS_VARIANTS --- bin/ebuild.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index be044e0..366cab6 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -246,12 +246,14 @@ inherit() { fi for repo_location in "${PORTAGE_ECLASS_LOCATIONS[@]}"; do - potential_location="${repo_location}/eclass/${1}.eclass" + for x in ${PORTAGE_ECLASS_VARIANTS:-} ''; do + potential_location="${repo_location}/eclass${x:+/}${x}/${1}.eclass" if [[ -f ${potential_location} ]]; then location="${potential_location}" debug-print " eclass exists: ${location}" - break + break 2 fi + done done debug-print "inherit: $1 -> $location" [[ -z ${location} ]] && die "${1}.eclass could not be found by inherit()" -- 1.8.3.2 --------------090109080100050709090006--