From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-45196-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Q6mF1-0005KP-2Q
	for garchives@archives.gentoo.org; Mon, 04 Apr 2011 16:02:59 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A02DA1C0C2;
	Mon,  4 Apr 2011 16:02:47 +0000 (UTC)
Received: from mail-pv0-f181.google.com (mail-pv0-f181.google.com [74.125.83.181])
	by pigeon.gentoo.org (Postfix) with ESMTP id 4B2981C0B2
	for <gentoo-dev@lists.gentoo.org>; Mon,  4 Apr 2011 16:02:06 +0000 (UTC)
Received: by pvg13 with SMTP id 13so2258383pvg.40
        for <gentoo-dev@lists.gentoo.org>; Mon, 04 Apr 2011 09:02:05 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.142.155.5 with SMTP id c5mr6410392wfe.139.1301932925547; Mon,
 04 Apr 2011 09:02:05 -0700 (PDT)
Sender: antarus@scriptkitty.com
Received: by 10.68.41.166 with HTTP; Mon, 4 Apr 2011 09:02:03 -0700 (PDT)
In-Reply-To: <4D9997BC.9090004@gentoo.org>
References: <201104031938.18311.Arfrever@gentoo.org>
	<4D98CA42.6010204@gentoo.org>
	<201104040113.37972.Arfrever@gentoo.org>
	<4D9997BC.9090004@gentoo.org>
Date: Mon, 4 Apr 2011 09:02:03 -0700
X-Google-Sender-Auth: GCXaGRQS-2ziN7OW7rucQLCqUWw
Message-ID: <BANLkTikOFD9aQxXcfcnYO9g4jO9TzBwdMw@mail.gmail.com>
Subject: Re: [gentoo-dev] Re: python-namespaces.eclass
From: Alec Warner <antarus@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: =?UTF-8?B?VG9tw6HFoSBDaHbDoXRhbA==?= <scarabeus@gentoo.org>, qa@gentoo.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 7578da90b729f059c6f19825bc34a404

2011/4/4 Tom=C3=A1=C5=A1 Chv=C3=A1tal <scarabeus@gentoo.org>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dne 4.4.2011 01:13, Arfrever Frehtes Taifersar Arahesis napsal(a):
>> 2011-04-03 21:28:02 Tom=C3=A1=C5=A1 Chv=C3=A1tal napisa=C5=82(a):
>>> Dne 3.4.2011 19:38, Arfrever Frehtes Taifersar Arahesis napsal(a):
>>>> I would like to add python-namespaces.eclass. This eclass will be used=
 by a small number of
>>>> special packages, which will provide Python namespaces. These packages=
 will be used as
>>>> dependencies of other packages already present in the tree.
>>>>
>>>> Ebuilds using this eclass must set PYTHON_NAMESPACES variable before i=
nheriting this eclass.
>>>> Example (from net-zope/namespaces-zope):
>>>> =C2=A0 PYTHON_NAMESPACES=3D"Products Shared Shared.DC five +zope zope.=
app"
>>>>
>>>> This eclass provides 3 public functions:
>>>> =C2=A0 python-namespaces_src_install()
>>>> =C2=A0 python-namespaces_pkg_postinst()
>>>> =C2=A0 python-namespaces_pkg_postrm()
>>>>
>>> Why you do so much overquoting in the conditions?
>>
>> I like consistency with python.eclass and improved syntax highlighting :=
) .
> Improved syntax highlighting? Apart from making it a bit larger that
> indeed is not a point if bash has to process and strip all the quotes
> your code is to be slower than the one without them.

If you are going to complain about quotes, at least complain sanely.
The cost of 'parsing the quotes' is negligible.  It is not a question
of performance, it is a question of readability and style.

>>
>>> Why do you die on those arguments, just ignore them...
>>
>> The policy for Python-related eclasses is to not ignore misusage of func=
tions.
>
> It is policy defined by you that makes the code larger for no gain. You
> do the same when you check if the ebuild scope is the same for the
> function. These checks are not required for any aparent reason. If
> developer wants to execute src_unpack in src_prepare and shoot himself
> into his leg eclasses are not the one that should prevent him from doing
> so. Basically you just add useless logic into the functions, so please
> do not do that. (this apply for all your patches)
>>
>>> You could use some eclass-debug calls (see other eclasses) :)
>>
>> IMHO they are helpless in debugging. 'set -x' enabled by -d option of em=
erge is more helpful.
>>
> Ok if you don't feel it helps the development then indeed it is not
> required to set them :)
>
>>> Why do you call those set_metadata right after its creation and delete
>>> it right away, does it save so much time it is better than doing it in
>>> global scope?
>>
>> It is used to have appropriate scope for local variables, so that they d=
on't have to be unset
>> manually immediately after the code, in which they should exist.
>>
> OOk works for me.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2Zl7wACgkQHB6c3gNBRYeH9wCfcac24FDG2t8Z1JFZbZ8AQDSv
> Oq0An3AIfm+JehVVhZksgxmwNfhWi0Sd
> =3D0qyh
> -----END PGP SIGNATURE-----
>
>