aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/start-stop-daemon/start-stop-daemon/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
blob: 9fe0ca76002c4a1f4b096d4090ffbda3c30cd31f (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
29
30
31
32
33
34
35
36
37
38
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