From b9728f63c676e217efcf93c40ded2c3fad19d52c Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Sat, 9 Oct 2010 13:40:51 +0800 Subject: dpkg: fix package_deb error for linux-wrs The new dpkg will report linux-wrs version parse error, since there is a '_' inside. This patch fixes this issue. Signed-off-by: Dongxiao Xu --- meta/recipes-devtools/dpkg/dpkg/check_version.patch | 21 +++++++++++++++++++++ meta/recipes-devtools/dpkg/dpkg_1.15.8.5.bb | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/dpkg/dpkg/check_version.patch (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/dpkg/dpkg/check_version.patch b/meta/recipes-devtools/dpkg/dpkg/check_version.patch new file mode 100644 index 000000000..a09e1361b --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/check_version.patch @@ -0,0 +1,21 @@ +Adapt to linux-wrs kernel version, which has character '_' inside. + +Signed-off-by: Dongxiao Xu + +diff -ruN dpkg-1.15.8.5-orig/lib/dpkg/parsehelp.c dpkg-1.15.8.5/lib/dpkg/parsehelp.c +--- dpkg-1.15.8.5-orig/lib/dpkg/parsehelp.c 2010-10-08 12:27:15.058572774 +0800 ++++ dpkg-1.15.8.5/lib/dpkg/parsehelp.c 2010-10-09 11:18:15.484190771 +0800 +@@ -268,11 +268,11 @@ + + /* XXX: Would be faster to use something like cisversion and cisrevision. */ + for (ptr = rversion->version; *ptr; ptr++) { +- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL) ++ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL) + return _("invalid character in version number"); + } + for (ptr = rversion->revision; *ptr; ptr++) { +- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~", *ptr) == NULL) ++ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~_", *ptr) == NULL) + return _("invalid character in revision number"); + } + diff --git a/meta/recipes-devtools/dpkg/dpkg_1.15.8.5.bb b/meta/recipes-devtools/dpkg/dpkg_1.15.8.5.bb index 2562f4b72..760ecd323 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.15.8.5.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.15.8.5.bb @@ -1,7 +1,8 @@ require dpkg.inc SRC_URI += "file://noman.patch;patch=1 \ - file://check_snprintf.patch" + file://check_snprintf.patch \ + file://check_version.patch" EXTRA_OECONF = "--without-static-progs \ --without-dselect \ -- cgit v1.2.3