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

dpkg: Complete arch checking of package relationships in the resolver

In places where the architecture qualifier of a dependency has not been
validated before-hand (through usage of deppossi_pkg_iterator), add a
manual verification.

In both cases, the checks are not needed with the current rules where
both Replaces and Breaks can only have “any” as architecture qualifier
but for completeness, we put them nevertheless.

Signed-off-by: Guillem Jover <guillem@debian.org>
Steve Langasek лет назад: 15
Родитель
Сommit
058c1fda3c
2 измененных файлов с 8 добавлено и 0 удалено
  1. 4 0
      src/archives.c
  2. 4 0
      src/packages.c

+ 4 - 0
src/archives.c

@@ -228,6 +228,10 @@ does_replace(struct pkginfo *newpigp, struct pkgbin *newpifp,
           versiondescribe(&dep->list->version,vdew_always));
     if (!versionsatisfied(oldpifp, dep->list))
       continue;
+    /* The test below can only trigger if dep_replaces start having
+     * arch qualifiers different from “any”. */
+    if (!archsatisfied(oldpifp, dep->list))
+      continue;
     debug(dbg_depcon,"does_replace ... yes");
     return true;
   }

+ 4 - 0
src/packages.c

@@ -470,6 +470,10 @@ breaks_check_one(struct varbuf *aemsgs, enum dep_check *ok,
       breaker->status == stat_configfiles) return;
   if (broken == breaker) return;
   if (!versionsatisfied(&broken->installed, breaks)) return;
+  /* The test below can only trigger if dep_breaks start having
+   * arch qualifiers different from “any”. */
+  if (!archsatisfied(&broken->installed, breaks))
+    return;
   if (ignore_depends(breaker)) return;
   if (virtbroken && ignore_depends(&virtbroken->pkg))
     return;