Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359311 - sys-apps/openrc-0.7.0 uses bashism in net/bonding.sh
Summary: sys-apps/openrc-0.7.0 uses bashism in net/bonding.sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 23:36 UTC by Raffaello D. Di Napoli
Modified: 2011-03-18 18:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix bashism with POSIX-compliant code (openrc-0.7.0-bashism.patch,675 bytes, patch)
2011-03-17 23:42 UTC, Raffaello D. Di Napoli
Details | Diff
ebuild patch to apply the above (openrc-0.7.0.ebuild.patch,418 bytes, patch)
2011-03-17 23:44 UTC, Raffaello D. Di Napoli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raffaello D. Di Napoli 2011-03-17 23:36:33 UTC
The file in summary contains the line:

  slaves="${slaves/${primary}/}"

which fails in busybox sh (and any other non-bash shell).
This replacement works, effectively removing the first instance of ${primary}:

  slaves="${slaves%%${primary}*}${slaves#*${primary}}"


Reproducible: Always
Comment 1 Raffaello D. Di Napoli 2011-03-17 23:42:35 UTC
Created attachment 266313 [details, diff]
Fix bashism with POSIX-compliant code
Comment 2 Raffaello D. Di Napoli 2011-03-17 23:44:38 UTC
Created attachment 266315 [details, diff]
ebuild patch to apply the above
Comment 3 SpanKY gentoo-dev 2011-03-18 18:25:34 UTC
that code is not equivalent.  ive fixed things this way instead:
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=9f5eb03e5ef30f4357d05e004f38ea6ca0d21346