Skip to content

Commit b8c3b20

Browse files
committed
Add another SUSE hack: complex requires in ptf packages should only match package names
1 parent 25356d1 commit b8c3b20

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/rules.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,16 @@ add_package_link(Solver *solv, Solvable *s, Map *m, Queue *workq)
498498

499499
#ifdef ENABLE_COMPLEX_DEPS
500500

501+
#ifdef SUSE
502+
static inline int
503+
suse_isptf(Pool *pool, Solvable *s)
504+
{
505+
if (!strncmp("ptf-", pool_id2str(pool, s->name), 4))
506+
return 1;
507+
return 0;
508+
}
509+
#endif
510+
501511
static void
502512
add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *workq, Map *m)
503513
{
@@ -511,6 +521,10 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
511521
/* CNF expansion for requires, DNF + INVERT expansion for conflicts */
512522
if (type == SOLVER_RULE_PKG_CONFLICTS)
513523
flags |= CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT;
524+
#ifdef SUSE
525+
if (type == SOLVER_RULE_PKG_REQUIRES && suse_isptf(pool, pool->solvables + p))
526+
flags |= CPLXDEPS_NAME; /* do not match provides */
527+
#endif
514528

515529
i = pool_normalize_complex_dep(pool, dep, &bq, flags);
516530
/* handle special cases */

0 commit comments

Comments
 (0)