| 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 453077fd9..f42ea2882 100644 |
| --- a/lib/dpkg/parsehelp.c |
| +++ b/lib/dpkg/parsehelp.c |
| @@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string, |
| ptr = rversion->version; |
| if (!*ptr) |
| return dpkg_put_error(err, _("version number is empty")); |
| - 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.11.0 |