blob: 9fe0ca76002c4a1f4b096d4090ffbda3c30cd31f [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From b4ea54158c399874e12394ebc91afe98954695e2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 26 Aug 2015 16:16:16 +0300
4Subject: [PATCH 2/5] Adapt to linux-wrs kernel version, which has character
5 '_' inside. Remove the first-char-digit-check (as the 1.15.8.5 version does).
6
7Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
8Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
9
10Upstream-Status: Inappropriate [embedded specific]
11---
12 lib/dpkg/parsehelp.c | 6 ++----
13 1 file changed, 2 insertions(+), 4 deletions(-)
14
15diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
16index 453077fd9..f42ea2882 100644
17--- a/lib/dpkg/parsehelp.c
18+++ b/lib/dpkg/parsehelp.c
19@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
20 ptr = rversion->version;
21 if (!*ptr)
22 return dpkg_put_error(err, _("version number is empty"));
23- if (*ptr && !c_isdigit(*ptr++))
24- return dpkg_put_warn(err, _("version number does not start with digit"));
25 for (; *ptr; ptr++) {
26- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
27+ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL)
28 return dpkg_put_warn(err, _("invalid character in version number"));
29 }
30 for (ptr = rversion->revision; *ptr; ptr++) {
31- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".+~", *ptr) == NULL)
32+ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~_", *ptr) == NULL)
33 return dpkg_put_warn(err, _("invalid character in revision number"));
34 }
35
36
37--
382.11.0