summaryrefslogtreecommitdiff
path: root/src/repo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo.h')
-rw-r--r--src/repo.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/repo.h b/src/repo.h
index 58704f1..9a5e981 100644
--- a/src/repo.h
+++ b/src/repo.h
@@ -123,6 +123,26 @@ static inline int pool_installable(const Pool *pool, Solvable *s)
return 1;
}
+#ifdef LIBSOLV_INTERNAL
+static inline int pool_installable_whatprovides(const Pool *pool, Solvable *s)
+{
+ /* we always need the installed solvable in the whatprovides data,
+ otherwise obsoletes/conflicts on them won't work */
+ if (s->repo != pool->installed)
+ {
+ if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC || pool_badarch_solvable(pool, s))
+ return 0;
+ if (pool->considered && !pool->whatprovideswithdisabled)
+ {
+ Id id = s - pool->solvables;
+ if (!MAPTST(pool->considered, id))
+ return 0;
+ }
+ }
+ return 1;
+}
+#endif
+
/* not in solvable.h because we need the repo definition */
static inline Solvable *solvable_free(Solvable *s, int reuseids)
{