* [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox
@ 2014-10-20 9:21 Liu Jian
2014-10-20 9:40 ` Paul Barker
0 siblings, 1 reply; 4+ messages in thread
From: Liu Jian @ 2014-10-20 9:21 UTC (permalink / raw)
To: openembedded-core
Building a small filesystem with busybox gives the following error lines:
(see log.do_rootfs under bitbake_build/tmp/work/)
sed: -e expression #1, char 41: unterminated address regex
sed: -e expression #1, char 42: unterminated address regex
This is caused by the script
bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/update-alternatives.
"[" can not be used directly in sed expression.
Signed-off-by: Jian Liu <jian.liu@windriver.com>
---
...andle-leftbracket-for-update-alternatives.patch | 23
++++++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 1 +
2 files changed, 24 insertions(+)
create mode 100644
meta/recipes-devtools/opkg/opkg/handle-leftbracket-for-update-alternatives.patch
diff --git
a/meta/recipes-devtools/opkg/opkg/handle-leftbracket-for-update-alternatives.patch
b/meta/recipes-devtools/opkg/opkg/handle-leftbracket-for-update-alternatives.patch
new file mode 100644
index 0000000..7c9eac7
--- /dev/null
+++
b/meta/recipes-devtools/opkg/opkg/handle-leftbracket-for-update-alternatives.patch
@@ -0,0 +1,23 @@
+diff -Nur trunk.orig/utils/update-alternatives.in
trunk/utils/update-alternatives.in
+--- trunk.orig/utils/update-alternatives.in 2013-08-16
04:22:29.000000000 +0800
++++ trunk/utils/update-alternatives.in 2014-09-19 10:55:22.238159317 +0800
+@@ -68,6 +68,10 @@
+ sed -e 's/\//\\\//g'
+ }
+
++protect_special_character() {
++ sed -e 's/\[/\\\[/g'
++}
++
+ remove_alt() {
+ [ $# -lt 2 ] && return 1
+ local name="$1"
+@@ -75,7 +79,7 @@
+
+ [ ! -f $ad/$name ] && return 0
+
+- path=`echo $path | protect_slashes`
++ path=`echo $path | protect_slashes | protect_special_character`
+ sed -ne "/^$path\>.*/!p" $ad/$name > $ad/$name.new
+ mv $ad/$name.new $ad/$name
+ }
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb
b/meta/recipes-devtools/opkg/opkg_svn.bb
index cd0485f..a6de6a5 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -4,6 +4,7 @@ SRC_URI =
"svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
file://no-install-recommends.patch \
file://add-exclude.patch \
file://opkg-configure.service \
+ file://handle-leftbracket-for-update-alternatives.patch \
"
S = "${WORKDIR}/trunk"
--
1.8.5.2.233.g932f7e4
--
Jian Liu
Email: jian.liu@windriver.com
Office Phone: 86-10-84778539
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox
2014-10-20 9:21 [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox Liu Jian
@ 2014-10-20 9:40 ` Paul Barker
2014-10-20 15:04 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: Paul Barker @ 2014-10-20 9:40 UTC (permalink / raw)
To: Liu Jian; +Cc: OE Core
On 20 October 2014 10:21, Liu Jian <jian.liu@windriver.com> wrote:
>
> Building a small filesystem with busybox gives the following error lines:
> (see log.do_rootfs under bitbake_build/tmp/work/)
> sed: -e expression #1, char 41: unterminated address regex
> sed: -e expression #1, char 42: unterminated address regex
> This is caused by the script
> bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/update-alternatives.
> "[" can not be used directly in sed expression.
>
> Signed-off-by: Jian Liu <jian.liu@windriver.com>
This patch looks to be corrupted, opkg_svn.bb no longer exists in
oe-core (it's now opkg_0.2.2.bb) and your commit message is very
confusing as it references a log file and a path which only exists on
your system.
What version of poky or oe-core are you sending a patch against? And
have you read the contribution guidelines in
http://openembedded.org/wiki/Commit_Patch_Message_Guidelines and
http://openembedded.org/wiki/Styleguide?
Thanks,
--
Paul Barker
Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox
2014-10-20 9:40 ` Paul Barker
@ 2014-10-20 15:04 ` Burton, Ross
2014-10-22 6:06 ` Liu Jian
0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2014-10-20 15:04 UTC (permalink / raw)
To: Liu Jian; +Cc: OE Core
On 20 October 2014 10:40, Paul Barker <paul@paulbarker.me.uk> wrote:
> This patch looks to be corrupted, opkg_svn.bb no longer exists in
> oe-core (it's now opkg_0.2.2.bb) and your commit message is very
> confusing as it references a log file and a path which only exists on
> your system.
>
> What version of poky or oe-core are you sending a patch against? And
> have you read the contribution guidelines in
> http://openembedded.org/wiki/Commit_Patch_Message_Guidelines and
> http://openembedded.org/wiki/Styleguide?
Specifically the patch is missing an Upstream-Status tag, and as opkg
is part of the Yocto Project this should be Backport as obviously we'd
fix our own software instead of patching it.
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox
2014-10-20 15:04 ` Burton, Ross
@ 2014-10-22 6:06 ` Liu Jian
0 siblings, 0 replies; 4+ messages in thread
From: Liu Jian @ 2014-10-22 6:06 UTC (permalink / raw)
To: Burton, Ross, Paul Barker; +Cc: OE Core
Hi Ross and Barker,
You are right and I make a mistake.
Sorry.
Liu Jian
于 2014年10月20日 23:04, Burton, Ross 写道:
> On 20 October 2014 10:40, Paul Barker <paul@paulbarker.me.uk> wrote:
>> This patch looks to be corrupted, opkg_svn.bb no longer exists in
>> oe-core (it's now opkg_0.2.2.bb) and your commit message is very
>> confusing as it references a log file and a path which only exists on
>> your system.
>>
>> What version of poky or oe-core are you sending a patch against? And
>> have you read the contribution guidelines in
>> http://openembedded.org/wiki/Commit_Patch_Message_Guidelines and
>> http://openembedded.org/wiki/Styleguide?
> Specifically the patch is missing an Upstream-Status tag, and as opkg
> is part of the Yocto Project this should be Backport as obviously we'd
> fix our own software instead of patching it.
>
> Ross
>
--
Jian Liu
Email: jian.liu@windriver.com
Office Phone: 86-10-84778539
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-22 6:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 9:21 [PATCH 1/1] opkg_svn: update-alternatives fails for "[" and "[[" in busybox Liu Jian
2014-10-20 9:40 ` Paul Barker
2014-10-20 15:04 ` Burton, Ross
2014-10-22 6:06 ` Liu Jian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox