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