public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tomáš Chvátal" <scarabeus@gentoo.org>
To: gentoo-dev@lists.gentoo.org, qa@gentoo.org
Subject: Re: [gentoo-dev] Re: python-namespaces.eclass
Date: Mon, 04 Apr 2011 12:04:44 +0200	[thread overview]
Message-ID: <4D9997BC.9090004@gentoo.org> (raw)
In-Reply-To: <201104040113.37972.Arfrever@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áš 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	other threads:[~2011-04-04 10:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-03 17:38 [gentoo-dev] python-namespaces.eclass Arfrever Frehtes Taifersar Arahesis
2011-04-03 19:28 ` [gentoo-dev] python-namespaces.eclass Tomáš Chvátal
2011-04-03 23:13   ` Arfrever Frehtes Taifersar Arahesis
2011-04-04 10:04     ` Tomáš Chvátal [this message]
2011-04-04 16:02       ` Alec Warner
2011-04-04 17:43       ` [gentoo-dev] python-namespaces.eclass Arfrever Frehtes Taifersar Arahesis
2011-04-05  4:33     ` [gentoo-dev] python-namespaces.eclass Jeroen Roovers
2011-04-04  8:20 ` [gentoo-dev] python-namespaces.eclass Fabian Groffen
2011-04-04 11:48 ` Brian Harring
2011-04-04 18:01   ` Arfrever Frehtes Taifersar Arahesis
2011-04-30 21:27   ` Arfrever Frehtes Taifersar Arahesis
2011-04-30 22:32     ` Brian Harring
2011-04-30 22:49       ` Arfrever Frehtes Taifersar Arahesis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D9997BC.9090004@gentoo.org \
    --to=scarabeus@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=qa@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox