Comment 3 for bug 1701756

Revision history for this message
Alexander Stohr (alexander-stohr) wrote :

tracked it down to this lines in the file dpkg-1.18.4ubuntu1/lib/dpkg/parsehelp.c at the end of function parseversion() at line #186:

  /* 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)
      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)
      return dpkg_put_warn(err, _("invalid character in revision number"));
  }

quick rationale:
no underscores/colon(revision only)/special-chars/others allowed at present for neither version number nor the revision number.

valid design as of now for version item:
* start with a digit.
* continue with digit, alpha or ".-+~:" chars.
* terminate with a zero char.

valid design as of now for revision item:
* start/continue with digit, alpha or ".+~" chars.
* terminate with a zero char.

a sequence of "x86_64" would not work for any these strings => underscore!
a sequence of "3.4.5@home" would not work for any these strings => at-sign!

a sequence of "3:1.45" would not work for the revision string => colon!
a sequence of "3-4-5" would not work for the revision string => any dash! (the warn message would be raised for the first occurrence)

your sequence of "1:0.9.12.2+6.04.20160823-0ubuntu1" does not work => special char included! rectangular box here in the view. it might be some extended OEM char or a UTF-8 char or an unicode char or whatever. either it sneaked in originally, or it was added later on - even a backspace, CTRL+C or line break might be the root cause. You should be able to trace it down on your own.