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 AB5DA1380DC for ; Wed, 5 Feb 2014 08:08:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7AF21E09E5; Wed, 5 Feb 2014 08:08:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D22DEE08A1 for ; Wed, 5 Feb 2014 08:08:22 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CAEF433F945 for ; Wed, 5 Feb 2014 08:08:21 +0000 (UTC) From: Mike Frysinger To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [RFC] Location of Portage bash API (outside of ebuilds) Date: Wed, 05 Feb 2014 03:08:28 -0500 Message-ID: <1942412.7dStkugokl@vapier> Organization: wh0rd.org User-Agent: KMail/4.12.1 (Linux/3.13.0; KDE/4.12.1; x86_64; ; ) In-Reply-To: <201402012108.11867.Arfrever.FTA@gmail.com> References: <201402012108.11867.Arfrever.FTA@gmail.com> 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 Content-Type: multipart/signed; boundary="nextPart2812853.rfLNoi0lm9"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-Archives-Salt: fdf59062-31e2-43e4-bde7-17b2c9a45884 X-Archives-Hash: 11399b96a7d46f0cd2e9d9e3085ac75a --nextPart2812853.rfLNoi0lm9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Saturday, February 01, 2014 21:08:11 Arfrever Frehtes Taifersar Arah= esis=20 wrote: > bin/isolated-functions.sh contains at least 1 useful function, which = could > be exposed for external consumers (without __ prefix), but must have > private name (with __ prefix) when bin/isolated-functions.sh is used = in > ebuild environment. who are these mysterious external consumers ? what you propose means all funcs in there now become exported API and w= e now=20 have to live with that. w/out any real background, i'm very hesitant t= o allow=20 that. > Possible solutions: > 1. Make /usr/lib/portage/bin/isolated-functions.sh magically define > non-private variants of useful functions when run in non-ebuild > environment. this is a no-go. we should be cutting down on internal overhead. > 2. Provide /usr/bin/portage.bash, which would source isolated-functio= ns.sh > (and maybe other files) and define non-private variants of useful > functions. /usr/bin/portage.bash would be easier sourceable due to PA= TH. > 3. Provide /usr/lib/portage.bash, which would source isolated-functio= ns.sh > (and maybe other files) and define non-private variants of useful > functions. > 4. Another location... >=20 > (I would probably prefer solution #2.) sounds like a file that should be sourced only which imo bans it from $= PATH. =20 i'm aware of the magic shell behavior where `source` searches PATH, but= that's=20 not an acceptable reason imo. easy to add something like `portageq helpers-dir` that'd give you a pat= h and=20 then you use that to load the various scripts directly. =2Dmike --nextPart2812853.rfLNoi0lm9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJS8fF8AAoJEEFjO5/oN/WB/WQQAIVtGIpIXz/LUsC1/2n/dUER L9hi2vShqGOXk3qHdd/yoKAwCNnykNCMN5j3rEOtpb54p/vdqOSYBWzyOjjZLJaK XQcRlhFcA0PIYRl3o1HU8GILQqZlFrzo9HsiulAXdaxLudWuLHydXvI0ie1og3Z2 CGqPQ5W1RdOy2/SUtqL1VXHooS2ICSPZupKZ1Q1Dyx4QRyRcC2Ce7rc4Zbf81g8g VVW5GOp9FUs95uJxS3pHLzyalWZY96BM4XqH8jVzY1y8KCBhELZ7+IZBlry+wDRg TMX7Q1DVOXL0GPxJ7ImeEdEnwe6pUvs1sEJ/ENo46knqNQvvpNYo1eX9S5yVbDk5 udOjU85lpaHSPFI4FiBrqha5mS+eKU5uNtMRtNDCZRs+gy14JdeII7QdYYJKkFCN 77Aic2DUeHlqEZJZnYB/hDyklKTG2P2nBbgwsA1kCqDkwYufSIFVeIwW2a5bDOBG tgvuVv5m7CO2FCIkVxPAi+hqXdyJ9KhtFJOX6tZTVKjRgbiNd/dLNfjhSReDgtoC CEC2+jlGgI6ifx8LVmx7DJwSqQAMUj2vD9AfEHl4PAfzEKJYN6D+07ClHJoZHkN6 NUtltqt0lUTKPr+ZI90MPKcwTHQfWQQT+vH1f9jjAFYkXUs/noI6aEYfDI3Rn3a4 cbRvfCNvz5BOaRqOUc1J =i8DO -----END PGP SIGNATURE----- --nextPart2812853.rfLNoi0lm9--