From eaed4ac011505b68129b900cdfe3a06cbca42c8e Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 6 Dec 2013 15:36:11 +0100 Subject: solv example: add autopackages on SUSE systems --- examples/solv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'examples') diff --git a/examples/solv.c b/examples/solv.c index 09258cb..d9b03a1 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -84,6 +84,9 @@ #include "repo_susetags.h" #include "repo_content.h" #endif +#ifdef SUSE +#include "repo_autopattern.h" +#endif #include "solv_xfopen.h" #ifdef FEDORA @@ -2385,6 +2388,17 @@ addfileprovides(Pool *pool) #endif +#ifdef SUSE +static void +add_autopackages(Pool *pool) +{ + int i; + Repo *repo; + FOR_REPOS(i, repo) + repo_add_autopattern(repo, 0); +} +#endif + #if defined(SUSE) || defined(FEDORA) static void add_patchjobs(Pool *pool, Queue *job) @@ -2927,6 +2941,9 @@ main(int argc, char **argv) #if defined(ENABLE_RPMDB) if (pool->disttype == DISTTYPE_RPM) addfileprovides(pool); +#endif +#ifdef SUSE + add_autopackages(pool); #endif pool_createwhatprovides(pool); -- cgit v1.2.3