Gentoo Archives: gentoo-dev

From: "Aaron W. Swenson" <titanofold@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: postgresql.eselect
Date: Tue, 29 Mar 2011 21:06:04
Message-Id: 4D92497D.30100@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: postgresql.eselect by Ulrich Mueller
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 03/29/2011 05:06 AM, Ulrich Mueller wrote:
5 >>>>>> On Mon, 28 Mar 2011, Aaron W Swenson wrote:
6 >
7 >> This module is to replace the existing one that is shipped with
8 >> <app-admin/eselect-postgresql-1.0.3. It is an entire rewrite.
9 >
10 > Some remarks:
11 >
12 > - Global scope code is a no-no in eselect modules, especially if it
13 > calls external programs or accesses external files. Your module
14 > will be sourced for commands like "eselect modules list" and there
15 > shouldn't be any global scope code being run on such occasions.
16 >
17 Fixed.
18
19 > - Don't use eval. It's almost always an indication that you're doing
20 > something wrong.
21 >
22 Yeah, I should have used 'find' as fewer "tricks" are needed. Wonder why
23 I didn't do that in the first place....
24
25 > - For tests, please use [[ ]] rather than [ ] throughout.
26 >
27 Done.
28
29 > - "output" and "path-manipulation" libraries are always loaded, so you
30 > need not (and in fact, you shouldn't) inherit them.
31 >
32 The dev guide could be clearer on that. Removed them from the inherit line.
33
34 > - Don't hardcode terminal specific escape sequences (like "\033[1m").
35 > Use the highlighting functions of the output library instead (which
36 > in turn use tput).
37 >
38 Except $(highlight ...) doesn't work in plain echo. So, I just stripped
39 it out.
40
41 > - Suppressing stdout of commands like "do_action env update" is fine,
42 > but why suppress stderr?
43 >
44 Because 'ls' would complain that files didn't exist, such as lib*.dylib
45 when on a Linux system. It doesn't matter. But, using 'find' avoids this
46 mess.
47
48 > - Please avoid lines wider than 79 positions.
49 >
50 Did where I could.
51
52 > See also eselect's README and the developer guide:
53 > <http://sources.gentoo.org/cgi-bin/viewvc.cgi/eselect/trunk/README>
54 Never knew that existed. Thanks for pointing that out.
55
56 > <http://www.gentoo.org/proj/en/eselect/dev-guide.xml>
57 >
58 That's where I got all of my information.
59
60 > Ulrich
61 >
62
63 Thank you for the feedback. It was quite helpful.
64
65 Now, I'm a bit sketchy on the handling of choosing which bitness for the
66 executables. (psql and friends.)
67
68 Sincerely,
69 Mr. Aaron W. Swenson
70 -----BEGIN PGP SIGNATURE-----
71 Version: GnuPG v2.0.17 (GNU/Linux)
72 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
73
74 iF4EAREIAAYFAk2SSX0ACgkQCOhwUhu5AEk4xQD9E6jabiGSNYycJSU871p82H1O
75 0iIU1kBV2HMhfJId/NgA/0Zoq2O3Pcy9O2OcthsQb6e8ZipJZ+dpffMCaC0zOqrs
76 =L/aO
77 -----END PGP SIGNATURE-----

Replies

Subject Author
[gentoo-dev] Re: RFC: postgresql.eselect Ryan Hill <dirtyepic@g.o>