diff options
author | acoul <acoul@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-04-25 06:28:09 +0000 |
---|---|---|
committer | acoul <acoul@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-04-25 06:28:09 +0000 |
commit | 190864f62a3b9a669716ed91d091f535c8ca9f13 (patch) | |
tree | 56f5d7b99e190ff641d00bf724848b2aed217130 /package | |
parent | 13e93684560de2faa88008652e776d0611f24a40 (diff) |
package/busybox: add upstream sed patch, bump release number
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21151 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/busybox/Makefile | 2 | ||||
-rw-r--r-- | package/busybox/patches/000-upstream-sed.patch | 47 |
2 files changed, 48 insertions, 1 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile index d13980ceb..bc2554b01 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.16.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads \ diff --git a/package/busybox/patches/000-upstream-sed.patch b/package/busybox/patches/000-upstream-sed.patch new file mode 100644 index 000000000..56d2304d2 --- /dev/null +++ b/package/busybox/patches/000-upstream-sed.patch @@ -0,0 +1,47 @@ +diff -urpN busybox-1.16.1/editors/sed.c busybox-1.16.1-sed/editors/sed.c +--- busybox-1.16.1/editors/sed.c 2010-03-28 13:43:35.000000000 -0400 ++++ busybox-1.16.1-sed/editors/sed.c 2010-04-20 13:33:26.301975462 -0400 +@@ -936,7 +936,15 @@ static void process_files(void) + /* Skip blocks of commands we didn't match */ + if (sed_cmd->cmd == '{') { + if (sed_cmd->invert ? matched : !matched) { +- while (sed_cmd->cmd != '}') { ++ unsigned nest_cnt = 0; ++ while (1) { ++ if (sed_cmd->cmd == '{') ++ nest_cnt++; ++ if (sed_cmd->cmd == '}') { ++ nest_cnt--; ++ if (nest_cnt == 0) ++ break; ++ } + sed_cmd = sed_cmd->next; + if (!sed_cmd) + bb_error_msg_and_die("unterminated {"); +@@ -1031,7 +1039,7 @@ static void process_files(void) + case 'c': + /* Only triggers on last line of a matching range. */ + if (!sed_cmd->in_match) +- sed_puts(sed_cmd->string, NO_EOL_CHAR); ++ sed_puts(sed_cmd->string, '\n'); + goto discard_line; + + /* Read file, append contents to output */ +diff -urpN busybox-1.16.1/testsuite/sed.tests busybox-1.16.1-sed/testsuite/sed.tests +--- busybox-1.16.1/testsuite/sed.tests 2010-03-19 22:58:07.000000000 -0400 ++++ busybox-1.16.1-sed/testsuite/sed.tests 2010-04-20 13:33:26.301975462 -0400 +@@ -248,4 +248,14 @@ testing "sed beginning (^) matches only + ">/usr</>lib<\n" "" \ + "/usr/lib\n" + ++testing "sed c" \ ++ "sed 'crepl'" \ ++ "repl\nrepl\n" "" \ ++ "first\nsecond\n" ++ ++testing "sed nested {}s" \ ++ "sed '/asd/ { p; /s/ { s/s/c/ }; p; q }'" \ ++ "qwe\nasd\nacd\nacd\n" "" \ ++ "qwe\nasd\nzxc\n" ++ + exit $FAILCOUNT |