Просмотр исходного кода

libdpkg: Consider M-A:same package without architecture fatal errors

“Multi-Arch: same” packages require an actual architecture to be able
to properly handle them, demand it.
Guillem Jover лет назад: 14
Родитель
Сommit
806a7821b2
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      lib/dpkg/parse.c

+ 3 - 0
lib/dpkg/parse.c

@@ -206,6 +206,9 @@ pkg_parse_verify(struct parsedb_state *ps,
   if (pkgbin->arch->type == arch_none)
     pkgbin->arch = dpkg_arch_get(arch_empty);
 
+  if (pkgbin->arch->type == arch_empty && pkgbin->multiarch == multiarch_same)
+    parse_error(ps, _("package has field '%s' but is missing architecture"),
+                "Multi-Arch: same");
   if (pkgbin->arch->type == arch_all && pkgbin->multiarch == multiarch_same)
     parse_error(ps, _("package has field '%s' but is architecture all"),
                 "Multi-Arch: same");