]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add another SUSE hack: complex requires in ptf packages should only match package...
authorMichael Schroeder <mls@suse.de>
Mon, 11 Nov 2019 11:53:55 +0000 (12:53 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 20 May 2021 09:40:05 +0000 (11:40 +0200)
src/rules.c

index 87540be53b361a56a1a8c1b2d965a7971984e225..9258bde2360c772b70e9ee73e8a87bdba2b3cb53 100644 (file)
@@ -498,6 +498,16 @@ add_package_link(Solver *solv, Solvable *s, Map *m, Queue *workq)
 
 #ifdef ENABLE_COMPLEX_DEPS
 
+#ifdef SUSE
+static inline int
+suse_isptf(Pool *pool, Solvable *s)
+{
+  if (!strncmp("ptf-", pool_id2str(pool, s->name), 4))
+    return 1;
+  return 0;
+}
+#endif
+
 static void
 add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *workq, Map *m)
 {
@@ -511,6 +521,10 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
   /* CNF expansion for requires, DNF + INVERT expansion for conflicts */
   if (type == SOLVER_RULE_PKG_CONFLICTS)
     flags |= CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT;
+#ifdef SUSE
+  if (type == SOLVER_RULE_PKG_REQUIRES && suse_isptf(pool, pool->solvables + p))
+    flags |= CPLXDEPS_NAME;    /* do not match provides */
+#endif
 
   i = pool_normalize_complex_dep(pool, dep, &bq, flags);
   /* handle special cases */