Gentoo Archives: gentoo-dev

From: "Tomáš Chvátal" <scarabeus@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] office-ext.eclass
Date: Tue, 30 Aug 2011 07:26:55
Message-Id: 4E5C9098.4060202@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] office-ext.eclass by Ulrich Mueller
1 Dne 30.8.2011 09:02, Ulrich Mueller napsal(a):
2 >>>>>> On Tue, 30 Aug 2011, Tomáš Chvátal wrote:
3 >
4 >> See the attachment for the latest version :)
5 >
6 >> # @FUNCTION: office-ext_get_implementation
7 >> [...]
8 >> for i in "${implementations[$@]}"; do
9 >
10 > I think this should read "${implementations[@]}" instead, if the
11 > intention is to loop over all array elements.
12 >
13
14 You are right hell of a copy&pasto :)
15
16
17 >> # @FUNCTION: office-ext_remove_extension
18 >> [...]
19 >> ${UNOPKG_BINARY} remove --shared "${ext}" \
20 >
21 > Not sure what unopkg accepts, but I guess you want to pass several
22 > arguments here. So ${ext} shouldn't be quoted.
23 >
24 > And why is the intermediate variable ext needed here, in the first
25 > place? You could use "$@" directly (this time, with the quotes).
26 >
27 Nah i want to give it just one argument, the name of the extension and
28 it can contain spaces -> $@.
29
30 For what is worth i prefer to use local variables just because it is
31 easier if I decide to change what i want to parse from $@ to something else.
32
33 Good question is if it handles the extension name with spaces or that it
34 require quotes. As we don't have one with spaces for now I would rather
35 keep the quotes and alter it only in future if we find out that it is
36 not really required.
37
38 >> # @FUNCTION: office-ext_src_install
39 >> [...]
40 >> # subshell to not polute rest of the env with the insinto redefinition
41 >
42 > s/polute/pollute/
43 >
44 >> for i in "${OO_EXTENSIONS[$@]}"; do
45 >
46 > See above about $@.
47 >
48 >> # @FUNCTION: office-ext_pkg_postinst
49 >> [...]
50 >> for i in "${OO_EXTENSIONS[$@]}"; do
51 >
52 > Ditto.
53 >
54 >> # @FUNCTION: office-ext_pkg_prerm
55 >> [...]
56 >> for i in "${OO_EXTENSIONS[$@]}"; do
57 >
58 > Ditto.
59 >
60
61 Addressed :)
62
63 Tom

Attachments

File name MIME type
office-ext.eclass text/plain

Replies

Subject Author
Re: [gentoo-dev] [RFC] office-ext.eclass "Michał Górny" <mgorny@g.o>