From: Michael Schroeder Date: Wed, 8 Nov 2017 14:14:12 +0000 (+0100) Subject: Call repo_add_autopattern before writing the repo X-Git-Tag: 0.6.31~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=276e7586cce0535c194336cd2a3bac9d4f5805e1;p=thirdparty%2Flibsolv.git Call repo_add_autopattern before writing the repo Otherwise the extension will never have the correct size if the repo does not get rewritten because of missing file provides. --- diff --git a/examples/solv/repoinfo_type_rpmmd.c b/examples/solv/repoinfo_type_rpmmd.c index 2a5cd7fc..7828379a 100644 --- a/examples/solv/repoinfo_type_rpmmd.c +++ b/examples/solv/repoinfo_type_rpmmd.c @@ -14,6 +14,9 @@ #ifdef ENABLE_APPDATA #include "repo_appdata.h" #endif +#ifdef SUSE +#include "repo_autopattern.h" +#endif #include "repoinfo.h" #include "repoinfo_cache.h" @@ -194,6 +197,9 @@ repomd_load(struct repoinfo *cinfo, Pool **sigpoolp) } fclose(fp); } +#endif +#ifdef SUSE + repo_add_autopattern(repo, 0); #endif data = repo_add_repodata(repo, 0); repodata_extend_block(data, repo->start, repo->end - repo->start); diff --git a/examples/solv/repoinfo_type_susetags.c b/examples/solv/repoinfo_type_susetags.c index c22c736d..af933afc 100644 --- a/examples/solv/repoinfo_type_susetags.c +++ b/examples/solv/repoinfo_type_susetags.c @@ -12,6 +12,9 @@ #ifdef ENABLE_APPDATA #include "repo_appdata.h" #endif +#ifdef SUSE +#include "repo_autopattern.h" +#endif #include "repoinfo.h" #include "repoinfo_cache.h" @@ -263,6 +266,9 @@ susetags_load(struct repoinfo *cinfo, Pool **sigpoolp) } #endif repo_internalize(repo); +#ifdef SUSE + repo_add_autopattern(repo, 0); +#endif data = repo_add_repodata(repo, 0); repodata_extend_block(data, repo->start, repo->end - repo->start); susetags_add_ext(repo, data);