-----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áš Chvátal napisał(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 
>>> inheriting this eclass.
>>> Example (from net-zope/namespaces-zope):
>>>   PYTHON_NAMESPACES="Products Shared Shared.DC five +zope zope.app"
>>>
>>> This eclass provides 3 public functions:
>>>   python-namespaces_src_install()
>>>   python-namespaces_pkg_postinst()
>>>   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.
> 
>> Why do you die on those arguments, just ignore them...
> 
> The policy for Python-related eclasses is to not ignore misusage of functions.

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 emerge 
> 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 don'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
=0qyh
-----END PGP SIGNATURE-----

Reply via email to