summaryrefslogtreecommitdiff
path: root/data/_dpkg/tolerance.diff
blob: f1c1400f6692dc01c972dc6b359e241fec878d82 (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
diff -ur dpkg-1.18.25/lib/dpkg/parse.c dpkg-1.18.25+iPhone/lib/dpkg/parse.c
--- dpkg-1.18.25/lib/dpkg/parse.c	2018-06-25 16:48:17.000000000 -1000
+++ dpkg-1.18.25+iPhone/lib/dpkg/parse.c	2018-09-14 10:07:52.000000000 -1000
@@ -187,8 +187,6 @@
   if ((ps->flags & pdb_recordavailable) ||
       (pkg->status != PKG_STAT_NOTINSTALLED &&
        pkg->status != PKG_STAT_HALFINSTALLED)) {
-    parse_ensure_have_field(ps, &pkgbin->description, "description");
-    parse_ensure_have_field(ps, &pkgbin->maintainer, "maintainer");
     parse_must_have_field(ps, pkgbin->version.version, "version");
   }
 
diff -ur dpkg-1.18.25/lib/dpkg/parsehelp.c dpkg-1.18.25+iPhone/lib/dpkg/parsehelp.c
--- dpkg-1.18.25/lib/dpkg/parsehelp.c	2018-06-17 05:49:22.000000000 -1000
+++ dpkg-1.18.25+iPhone/lib/dpkg/parsehelp.c	2018-09-14 10:09:14.000000000 -1000
@@ -239,21 +239,6 @@
   }
   rversion->revision= hyphen ? hyphen : "";
 
-  /* XXX: Would be faster to use something like cisversion and cisrevision. */
-  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)
-      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"));
-  }
-
   return 0;
 }