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"));
   }
