Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: New eclass: ros-catkin.eclass, new USE_EXPAND: ROS_MESSAGES, new categories: dev-ros and ros-meta for review.
Date: Thu, 17 Sep 2015 23:17:31
Message-Id: pan$42df3$e9bfd4c$de574afc$8771c965@cox.net
In Reply to: [gentoo-dev] New eclass: ros-catkin.eclass, new USE_EXPAND: ROS_MESSAGES, new categories: dev-ros and ros-meta for review. by Alexis Ballier
1 Alexis Ballier posted on Thu, 17 Sep 2015 18:36:06 +0200 as excerpted:
2
3 > if [ "${PV#9999}" != "${PV}" ] ; then
4 > SCM="git-r3"
5 > fi
6
7 [and elsewhere]
8
9 I've seen this asked in other eclass review contexts, but not for
10 awhile...
11
12 Since gentoo requires bash, why are you using old borne shell
13 compatibility test logic? Why not use [[ ]] tests and avoid the need for
14 the "", since bash then can treat variables as a unit and quotes are only
15 needed if the tested strings include variable-external space (thus
16 avoiding quote-logic errors if you accidentally forget the quotes)?
17
18 (I used to use the compatibility single-[ variant myself, since the
19 working code I originally learned bash with was explicitly borne-
20 compatible sysv-init init-scripts. But once I began to appreciate the
21 power of the double-[[ version, I soon vastly preferred it, except of
22 course where compatibility is necessary, and it explicitly is not here,
23 since gentoo and PMS explicitly specify bash.)
24
25 --
26 Duncan - List replies preferred. No HTML msgs.
27 "Every nonfree program has a lord, a master --
28 and if you use the program, he is your master." Richard Stallman

Replies