From: Michael Schroeder Date: Wed, 24 May 2017 09:54:02 +0000 (+0200) Subject: Add ENABLE_TESTCASE_HELIXREPO as hidden compile option X-Git-Tag: 0.6.28~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8eb63dc18e22380df8ce86399446dbce0831141;p=thirdparty%2Flibsolv.git Add ENABLE_TESTCASE_HELIXREPO as hidden compile option This is pretty much just for me using testsolv on testcases generated by libzypp. There used to be a #if 0 in the code which I manually toggled, but the option is much saner. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bcdeee64..79020651 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,7 +284,7 @@ ENDFOREACH (VAR) FOREACH (VAR ENABLE_RPMDB ENABLE_RPMPKG ENABLE_PUBKEY ENABLE_RPMMD ENABLE_RPMDB_BYRPMHEADER - ENABLE_SUSEREPO ENABLE_COMPS + ENABLE_SUSEREPO ENABLE_COMPS ENABLE_TESTCASE_HELIXREPO ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN ENABLE_HAIKU ENABLE_ZLIB_COMPRESSION ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION ENABLE_PGPVRFY ENABLE_APPDATA) diff --git a/ext/testcase.c b/ext/testcase.c index f515057c..70d0b73c 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -23,6 +23,9 @@ #include "testcase.h" #include "selection.h" #include "solv_xfopen.h" +#if ENABLE_TESTCASE_HELIXREPO +#include "ext/repo_helix.h" +#endif #define DISABLE_JOIN2 #include "tools_util.h" @@ -174,6 +177,9 @@ static const char *features[] = { #endif #ifdef ENABLE_COMPLEX_DEPS "complex_deps", +#endif +#if ENABLE_TESTCASE_HELIXREPO + "testcase_helixrepo", #endif 0 }; @@ -2617,10 +2623,9 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res repo_add_solv(repo, rfp, 0); fclose(rfp); } -#if 0 +#if ENABLE_TESTCASE_HELIXREPO else if (!strcmp(repotype, "helix")) { - extern int repo_add_helix(Repo *repo, FILE *fp, int flags); repo_add_helix(repo, rfp, 0); fclose(rfp); }