Преглед изворни кода

dpkg: When removing a foreign arch, only consider < halfinstalled an issue

Packages in lesser states do not pose any problem for dependencies.
Guillem Jover пре 14 година
родитељ
комит
708c788f95
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      src/main.c

+ 3 - 1
src/main.c

@@ -3,7 +3,7 @@
  * main.c - main program
  *
  * Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk>
- * Copyright © 2006-2010 Guillem Jover <guillem@debian.org>
+ * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
  * Copyright © 2010 Canonical Ltd.
  *   written by Martin Pitt <martin.pitt@canonical.com>
  *
@@ -523,6 +523,8 @@ arch_remove(const char *const *argv)
   /* Check if it's safe to remove the architecture from the db. */
   iter = pkg_db_iter_new();
   while ((pkg = pkg_db_iter_next_pkg(iter))) {
+    if (pkg->status < stat_halfinstalled)
+      continue;
     if (pkg->installed.arch == arch) {
       if (fc_architecture)
         warning(_("removing architecture '%s' currently in use by database"),