39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From b4ea54158c399874e12394ebc91afe98954695e2 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
Date: Wed, 26 Aug 2015 16:16:16 +0300
|
|
Subject: [PATCH 2/5] 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]
|
|
---
|
|
lib/dpkg/parsehelp.c | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
|
|
index 79b2908..7758aa5 100644
|
|
--- a/lib/dpkg/parsehelp.c
|
|
+++ b/lib/dpkg/parsehelp.c
|
|
@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
|
|
|
|
/* XXX: Would be faster to use something like cisversion and cisrevision. */
|
|
ptr = rversion->version;
|
|
- if (*ptr && !c_isdigit(*ptr++))
|
|
- return dpkg_put_warn(err, _("version number does not start with digit"));
|
|
for (; *ptr; ptr++) {
|
|
- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
|
|
+ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL)
|
|
return dpkg_put_warn(err, _("invalid character in version number"));
|
|
}
|
|
for (ptr = rversion->revision; *ptr; ptr++) {
|
|
- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".+~", *ptr) == NULL)
|
|
+ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~_", *ptr) == NULL)
|
|
return dpkg_put_warn(err, _("invalid character in revision number"));
|
|
}
|
|
|
|
--
|
|
2.1.4
|
|
|