* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
[not found] <E1IZu5i-00013W-Ix@stork.gentoo.org>
@ 2007-09-24 20:09 ` Donnie Berkholz
2007-09-24 23:51 ` Duncan
2007-09-25 8:54 ` Matthias Schwarzott
0 siblings, 2 replies; 7+ messages in thread
From: Donnie Berkholz @ 2007-09-24 20:09 UTC (permalink / raw
To: gentoo-dev; +Cc: zzam
On 19:59 Mon 24 Sep , Matthias Schwarzott (zzam) wrote:
> zzam 07/09/24 19:59:38
>
> Modified: ChangeLog
> Added: udev-115-r6.ebuild
> Log:
> Simplified rules a bit. Let user configure max inode nr of /dev, solving bug #193586.
> (Portage version: 2.1.3.9)
> 1.1 sys-fs/udev/udev-115-r6.ebuild
>
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-115-r6.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-115-r6.ebuild?rev=1.1&content-type=text/plain
> if [[ "${KV_MAJOR}" == 2 ]] && [[ "${KV_MINOR}" == 6 ]] && [[ "${KV_MICRO}" -ge 15 ]]; then
> if [[ "$ok" = "0" ]]; then
> if [ "${MD5}" != "644e3c77eb866dee4ff8dda2e95cd187" ]
> if [[ -f "packages/40-${ARCH}.rules" ]]; then
> if [ -h "${ROOT}/etc/hotplug.d/default/udev.hotplug" ]
> if [ -h "${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug" ]
> if [ -h "${ROOT}/etc/hotplug.d/default/10-udev.hotplug" ]
> if [ -f "${ROOT}/etc/init.d/coldplug" ]
> if [[ ${coldplug_stale} == "1" ]] ; then
> if [[ -e "${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules" ]]
> if [[ -d "${ROOT}"/lib/udev/devices ]]; then
> if [[ -e "${ROOT}"/etc/udev/rules.d/95-net.rules ]]; then
> if [[ -d "${ROOT}"/etc/dev.d ]]; then
> if [[ -d "${ROOT}"/etc/dev.d ]]; then
> [[ -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules ]] &&
> if [[ "${ROOT}" == "/" ]] ; then
> if [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]; then
> if [[ -n $(pidof udevd) ]] ; then
> MD5=`md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules"`
This ebuild has really inconsistent use of tests, quotes in tests, and
command substitutions. Being more consistent will increase readability
and decrease bugs due to differences between styles. For tests, pick a
style [[ ]] or [ ] and stick with it. The [[ ]] one is pretty nice
because it generally doesn't require quotes, so the code looks a lot
cleaner. For command substitions, prefer $() over ``.
> newins ${FILESDIR}/blacklist-110 blacklist
> doins ${FILESDIR}/pnp-aliases
Quotes here.
> emake \
> EXTRAS="${extras}" \
> libudevdir=${udev_helper_dir} \
> CROSS_COMPILE=${mycross} \
> OPTFLAGS="" \
> ${myconf} || die
> emake \
> DESTDIR="${D}" \
> libudevdir=${udev_helper_dir} \
> EXTRAS="${extras}" \
> ${myconf} \
> install || die
Could use some die messages here.
Thanks,
Donnie
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-24 20:09 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild Donnie Berkholz
@ 2007-09-24 23:51 ` Duncan
2007-09-25 0:20 ` Mike Frysinger
` (2 more replies)
2007-09-25 8:54 ` Matthias Schwarzott
1 sibling, 3 replies; 7+ messages in thread
From: Duncan @ 2007-09-24 23:51 UTC (permalink / raw
To: gentoo-dev
Donnie Berkholz <dberkholz@gentoo.org> posted
20070924200956.GS22279@supernova, excerpted below, on Mon, 24 Sep 2007
13:09:57 -0700:
> For tests, pick a style
> [[ ]] or [ ] and stick with it. The [[ ]] one is pretty nice because it
> generally doesn't require quotes, so the code looks a lot cleaner.
Can you point me (and anyone else that may be interested) to a nice
explanation of the difference? I've always wondered why [[ ]] is
considered "better" than [ ] for tests.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-24 23:51 ` Duncan
@ 2007-09-25 0:20 ` Mike Frysinger
2007-09-25 2:10 ` Lars Weiler
2007-09-25 2:19 ` Ryan Hill
2 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2007-09-25 0:20 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
On Monday 24 September 2007, Duncan wrote:
> Donnie Berkholz <dberkholz@gentoo.org> posted:
> > For tests, pick a style
> > [[ ]] or [ ] and stick with it. The [[ ]] one is pretty nice because it
> > generally doesn't require quotes, so the code looks a lot cleaner.
>
> Can you point me (and anyone else that may be interested) to a nice
> explanation of the difference?
i use `man bash` myself ...
> I've always wondered why [[ ]] is
> considered "better" than [ ] for tests.
as Donnie pointed out, it handles quoting sanely ... it also allows for
extended bash logic tests (like matching and regexps) as well as your
standard logic operators
fails:
f="moo cow with space"
[ ${f} = blah ]
works:
[[ ${f} == blah ]]
wildcards:
[[ ${f} == *moo* ]]
C logic operators (rather than crappy shell '-a' / '-o' / etc...):
[[ moo == foo || moo == moo && blah == doit ]]
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-24 23:51 ` Duncan
2007-09-25 0:20 ` Mike Frysinger
@ 2007-09-25 2:10 ` Lars Weiler
2007-09-25 2:19 ` Ryan Hill
2 siblings, 0 replies; 7+ messages in thread
From: Lars Weiler @ 2007-09-25 2:10 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
* Duncan <1i5t5.duncan@cox.net> [07/09/24 23:51 +0000]:
> Can you point me (and anyone else that may be interested) to a nice
> explanation of the difference? I've always wondered why [[ ]] is
> considered "better" than [ ] for tests.
I read about the difference in chapter 7 of the Advanced
Bash-Scripting Guide (`emerge abs-guide`). There are some
more nice examples.
Regards, Lars
--
Lars Weiler <pylon@gentoo.org> +49-171-1963258
Instant Messaging : pylon@jabber.ccc.de
Gentoo Linux PowerPC : Developer
Gentoo Infrastructure : CVS/SVN Administrator
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-24 23:51 ` Duncan
2007-09-25 0:20 ` Mike Frysinger
2007-09-25 2:10 ` Lars Weiler
@ 2007-09-25 2:19 ` Ryan Hill
2007-09-25 9:54 ` Duncan
2 siblings, 1 reply; 7+ messages in thread
From: Ryan Hill @ 2007-09-25 2:19 UTC (permalink / raw
To: gentoo-dev
Duncan wrote:
> Donnie Berkholz <dberkholz@gentoo.org> posted
> 20070924200956.GS22279@supernova, excerpted below, on Mon, 24 Sep 2007
> 13:09:57 -0700:
>
>> For tests, pick a style
>> [[ ]] or [ ] and stick with it. The [[ ]] one is pretty nice because it
>> generally doesn't require quotes, so the code looks a lot cleaner.
>
> Can you point me (and anyone else that may be interested) to a nice
> explanation of the difference? I've always wondered why [[ ]] is
> considered "better" than [ ] for tests.
check out http://tldp.org/LDP/abs/html/testconstructs.html#DBLBRACKETS
--
fonts / wxWindows / gcc-porting / treecleaners
9B81 6C9F E791 83BB 3AB3 5B2D E625 A073 8379 37E8 (0x837937E8)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-24 20:09 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild Donnie Berkholz
2007-09-24 23:51 ` Duncan
@ 2007-09-25 8:54 ` Matthias Schwarzott
1 sibling, 0 replies; 7+ messages in thread
From: Matthias Schwarzott @ 2007-09-25 8:54 UTC (permalink / raw
To: gentoo-dev
On Montag, 24. September 2007, Donnie Berkholz wrote:
> On 19:59 Mon 24 Sep , Matthias Schwarzott (zzam) wrote:
> > zzam 07/09/24 19:59:38
> >
>
> This ebuild has really inconsistent use of tests, quotes in tests, and
> command substitutions. Being more consistent will increase readability
> and decrease bugs due to differences between styles. For tests, pick a
> style [[ ]] or [ ] and stick with it. The [[ ]] one is pretty nice
> because it generally doesn't require quotes, so the code looks a lot
> cleaner. For command substitions, prefer $() over ``.
>
> > newins ${FILESDIR}/blacklist-110 blacklist
> > doins ${FILESDIR}/pnp-aliases
>
> Quotes here.
>
> > emake \
> > EXTRAS="${extras}" \
> > libudevdir=${udev_helper_dir} \
> > CROSS_COMPILE=${mycross} \
> > OPTFLAGS="" \
> > ${myconf} || die
> >
> > emake \
> > DESTDIR="${D}" \
> > libudevdir=${udev_helper_dir} \
> > EXTRAS="${extras}" \
> > ${myconf} \
> > install || die
>
> Could use some die messages here.
>
> Thanks,
> Donnie
fixed, thanks
Matthias
--
Matthias Schwarzott (zzam)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild
2007-09-25 2:19 ` Ryan Hill
@ 2007-09-25 9:54 ` Duncan
0 siblings, 0 replies; 7+ messages in thread
From: Duncan @ 2007-09-25 9:54 UTC (permalink / raw
To: gentoo-dev
Ryan Hill <dirtyepic@gentoo.org> posted fd9r7m$6p7$1@sea.gmane.org,
excerpted below, on Mon, 24 Sep 2007 20:19:34 -0600:
> Duncan wrote:
>> Can you point me (and anyone else that may be interested) to a nice
>> explanation of the difference? I've always wondered why [[ ]] is
>> considered "better" than [ ] for tests.
>
> check out http://tldp.org/LDP/abs/html/testconstructs.html#DBLBRACKETS
Thanks (to Mike and Lars too). Seems I have some reading to do. =8^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-09-25 12:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1IZu5i-00013W-Ix@stork.gentoo.org>
2007-09-24 20:09 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: ChangeLog udev-115-r6.ebuild Donnie Berkholz
2007-09-24 23:51 ` Duncan
2007-09-25 0:20 ` Mike Frysinger
2007-09-25 2:10 ` Lars Weiler
2007-09-25 2:19 ` Ryan Hill
2007-09-25 9:54 ` Duncan
2007-09-25 8:54 ` Matthias Schwarzott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox