summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg/check_version.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/dpkg/dpkg/check_version.patch')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/check_version.patch28
1 files changed, 28 insertions, 0 deletions
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 0000000..3175731
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/check_version.patch
@@ -0,0 +1,28 @@
1Adapt to linux-wrs kernel version, which has character '_' inside.
2Remove the first-char-digit-check (as the 1.15.8.5 version does).
3
4Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
5Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
6
7Upstream-Status: Inappropriate [embedded specific]
8
9Index: dpkg-1.16.8/lib/dpkg/parsehelp.c
10===================================================================
11--- dpkg-1.16.8.orig/lib/dpkg/parsehelp.c
12+++ dpkg-1.16.8/lib/dpkg/parsehelp.c
13@@ -258,14 +258,12 @@ parseversion(struct dpkg_version *rversi
14
15 /* XXX: Would be faster to use something like cisversion and cisrevision. */
16 ptr = rversion->version;
17- if (*ptr && !cisdigit(*ptr++))
18- return dpkg_put_warn(err, _("version number does not start with digit"));
19 for (; *ptr; ptr++) {
20- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
21+ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL)
22 return dpkg_put_warn(err, _("invalid character in version number"));
23 }
24 for (ptr = rversion->revision; *ptr; ptr++) {
25- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~", *ptr) == NULL)
26+ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~_", *ptr) == NULL)
27 return dpkg_put_warn(err, _("invalid character in revision number"));
28 }