Explorar o código

libdpkg: Do not allow Architecture all packges with Multi-Arch field

Guillem Jover %!s(int64=15) %!d(string=hai) anos
pai
achega
ad41337649
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      lib/dpkg/parse.c

+ 4 - 0
lib/dpkg/parse.c

@@ -200,6 +200,10 @@ pkg_parse_verify(struct parsedb_state *ps,
   if (pkgbin->arch == NULL)
     pkgbin->arch = dpkg_arch_find(NULL);
 
+  if (pkgbin->arch->type == arch_all && pkgbin->multiarch == multiarch_same)
+    parse_error(ps, _("package has field '%s' but is architecture all"),
+                "Multi-Arch: same");
+
   /* Check the Config-Version information:
    * If there is a Config-Version it is definitely to be used, but
    * there shouldn't be one if the package is ‘installed’ (in which case