Gentoo Archives: gentoo-dev

From: "Tomáš Chvátal" <scarabeus@g.o>
To: gentoo-dev@l.g.o, qa@g.o
Subject: Re: [gentoo-dev] Re: python-namespaces.eclass
Date: Mon, 04 Apr 2011 10:11:28
Message-Id: 4D9997BC.9090004@gentoo.org
In Reply to: [gentoo-dev] Re: python-namespaces.eclass by Arfrever Frehtes Taifersar Arahesis
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Dne 4.4.2011 01:13, Arfrever Frehtes Taifersar Arahesis napsal(a):
5 > 2011-04-03 21:28:02 Tomáš Chvátal napisał(a):
6 >> Dne 3.4.2011 19:38, Arfrever Frehtes Taifersar Arahesis napsal(a):
7 >>> I would like to add python-namespaces.eclass. This eclass will be used by a small number of
8 >>> special packages, which will provide Python namespaces. These packages will be used as
9 >>> dependencies of other packages already present in the tree.
10 >>>
11 >>> Ebuilds using this eclass must set PYTHON_NAMESPACES variable before inheriting this eclass.
12 >>> Example (from net-zope/namespaces-zope):
13 >>> PYTHON_NAMESPACES="Products Shared Shared.DC five +zope zope.app"
14 >>>
15 >>> This eclass provides 3 public functions:
16 >>> python-namespaces_src_install()
17 >>> python-namespaces_pkg_postinst()
18 >>> python-namespaces_pkg_postrm()
19 >>>
20 >> Why you do so much overquoting in the conditions?
21 >
22 > I like consistency with python.eclass and improved syntax highlighting :) .
23 Improved syntax highlighting? Apart from making it a bit larger that
24 indeed is not a point if bash has to process and strip all the quotes
25 your code is to be slower than the one without them.
26 >
27 >> Why do you die on those arguments, just ignore them...
28 >
29 > The policy for Python-related eclasses is to not ignore misusage of functions.
30
31 It is policy defined by you that makes the code larger for no gain. You
32 do the same when you check if the ebuild scope is the same for the
33 function. These checks are not required for any aparent reason. If
34 developer wants to execute src_unpack in src_prepare and shoot himself
35 into his leg eclasses are not the one that should prevent him from doing
36 so. Basically you just add useless logic into the functions, so please
37 do not do that. (this apply for all your patches)
38 >
39 >> You could use some eclass-debug calls (see other eclasses) :)
40 >
41 > IMHO they are helpless in debugging. 'set -x' enabled by -d option of emerge is more helpful.
42 >
43 Ok if you don't feel it helps the development then indeed it is not
44 required to set them :)
45
46 >> Why do you call those set_metadata right after its creation and delete
47 >> it right away, does it save so much time it is better than doing it in
48 >> global scope?
49 >
50 > It is used to have appropriate scope for local variables, so that they don't have to be unset
51 > manually immediately after the code, in which they should exist.
52 >
53 OOk works for me.
54 -----BEGIN PGP SIGNATURE-----
55 Version: GnuPG v2.0.17 (GNU/Linux)
56 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
57
58 iEYEARECAAYFAk2Zl7wACgkQHB6c3gNBRYeH9wCfcac24FDG2t8Z1JFZbZ8AQDSv
59 Oq0An3AIfm+JehVVhZksgxmwNfhWi0Sd
60 =0qyh
61 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-dev] Re: python-namespaces.eclass Alec Warner <antarus@g.o>
Re: [gentoo-dev] python-namespaces.eclass Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>