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 114E9138010 for ; Wed, 12 Sep 2012 20:37:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 06504E073C; Wed, 12 Sep 2012 20:37:20 +0000 (UTC) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 36D98E0720 for ; Wed, 12 Sep 2012 20:36:14 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3053774pbb.40 for ; Wed, 12 Sep 2012 13:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=rf+Za7vWJd58xRiZIrwCc5Z89kxHGGdPpf113kGcD0s=; b=Ed/N3xQmlbjMJNn4oFvXo5HzpHx0JnKYu1tb3RNkFpjAnBtAOMK6Mz/OtMlwGLZQ42 Aw3suwJBSKNCbvksvS5DVcPMsKg7dwRg8nMMOXRLqqCXaXBSKB9dn4lBG5/Yla2GIQ2n /JWwPX/Hnx9AYk1mN2stFJxV9gAjP9Ghb9ZJgqPvVDFCjh21/+4GIXPkx3azzofBZkVs qteZ/UvIMIWhQU8mVHe327ZTv7SOxj5LhVn/yh9hFJVA3Ab2PNy91APCWmVueX0unwTx Dp+KRI9BZazCjf8l9FvAS0jWowtcBXEKyM7fuHf3tQCZFKdgz481C7KkD08y2KOGlHZN Sg4A== Received: by 10.66.77.10 with SMTP id o10mr29609165paw.6.1347482174560; Wed, 12 Sep 2012 13:36:14 -0700 (PDT) Received: from smtp.gmail.com:587 (74-95-192-101-SFBA.hfc.comcastbusiness.net. [74.95.192.101]) by mx.google.com with ESMTPS id qa4sm130643pbb.70.2012.09.12.13.36.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 13:36:13 -0700 (PDT) Received: by smtp.gmail.com:587 (sSMTP sendmail emulation); Wed, 12 Sep 2012 13:36:21 -0700 Date: Wed, 12 Sep 2012 13:36:21 -0700 From: Brian Harring To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] EAPI5: require ebuilds/eclasses to not use any vars/funcs prefixed with __ Message-ID: <20120912203621.GA28593@localhost> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 109a6093-73e3-44d4-a7d0-e4c19dc02994 X-Archives-Hash: 317148db1c6fa8512e22a030ed475660 Hola folks. Currently portage exposes a fair amount of it's internal implementation via vars/funcs into the ebulid env; this frankly makes it easier for ebuilds/eclasses to localize themselves to portage (rather than PMS), leading to breakage. Thus a proposal for EAPI5 has been made, banning ebuilds/eclasses from using/accessing __, and requiring the PM to store it's internals in that namespace. Basically, instead of portage doing thus: is_function dyn_pkg_preinst && dyn_pkg_preinst It does thus: __is_function __dyn_pkg_preinst && __dyn_pkg_preinst. Aside from avoiding accidental conflicts/usage, the standardized namespacing makes it a helluva lot easier to have repoman/qa tools look for bad usage. Currently, there is a minor amount of ebuild/eclass usage of things named __*; ~90% of it is 'import once' eclass code like the following: """ if [[ ${___ECLASS_ONCE_LIBTOOL} != "recur -_+^+_- spank" ]] ; then ___ECLASS_ONCE_LIBTOOL="recur -_+^+_- spank """ Converting that is easy enough, and I'll be doing that work for gentoo-x86 if folks don't have an issue. Note there is a few vars we need to exempt; that list is currently SANDBOX_* and FEATURES. FEATURES is fine to exempt from this rule. For SANDBOX_*, while that's a PM internal, that's a bit of a grey zone; regardless, we can actually address that via extending the sandbox functions a bit: addwrite [-r|--remove] pathway # for example, to do a removal. For instances where the sandbox needs to be turned off for a command- we do the same thing we did w/ nonfatal; sandboxless which is just sandboxless() { SANDBOX_ON=0 "$@" } or SYDBOX_ON=0 (or their equivalent var) for sydbox usage. Comments? ~harring