Преглед на файлове

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 години
родител
ревизия
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");