Procházet zdrojové kódy

dselect: Abort select action if any foreign architecture is enabled

The selection code does not support multi-arch at all, so do not even
try to run it if there's a foreign architecture configured.
Guillem Jover před 14 roky
rodič
revize
62467910df
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      dselect/main.cc

+ 7 - 0
dselect/main.cc

@@ -358,9 +358,16 @@ extern void operator delete(void *p) {
 }
 
 urqresult urq_list(void) {
+  struct dpkg_arch *arch;
+
   readwrite = modstatdb_open((modstatdb_rw)(msdbrw_writeifposs |
                                             msdbrw_available_readonly));
 
+  // XXX: Multi-Arch is not supported, bail out.
+  for (arch = dpkg_arch_get_list(); arch; arch = arch->next)
+    if (arch->type == arch_foreign)
+      ohshit(_("foreign architectures enabled but multi-arch is not supported"));
+
   curseson();
 
   packagelist *l= new packagelist(&packagelistbindings);