From: Michael Schroeder Date: Fri, 6 Dec 2013 14:36:11 +0000 (+0100) Subject: solv example: add autopackages on SUSE systems X-Git-Tag: upstream/0.6.4~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eaed4ac011505b68129b900cdfe3a06cbca42c8e;p=platform%2Fupstream%2Flibsolv.git solv example: add autopackages on SUSE systems --- 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) @@ -2928,6 +2942,9 @@ main(int argc, char **argv) if (pool->disttype == DISTTYPE_RPM) addfileprovides(pool); #endif +#ifdef SUSE + add_autopackages(pool); +#endif pool_createwhatprovides(pool); if (keyname)