]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Call repo_add_autopattern before writing the repo
authorMichael Schroeder <mls@suse.de>
Wed, 8 Nov 2017 14:14:12 +0000 (15:14 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 8 Nov 2017 14:14:12 +0000 (15:14 +0100)
Otherwise the extension will never have the correct size if
the repo does not get rewritten because of missing file provides.

examples/solv/repoinfo_type_rpmmd.c
examples/solv/repoinfo_type_susetags.c

index 2a5cd7fc6622137761716805d5db48e3be840851..7828379a257fa6aab92b87580507cbc31a5101d8 100644 (file)
@@ -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);
index c22c736d30dc4f0a21410225bb8bda21326bc9eb..af933afcca236e5f57d32904ac28ab876a9e1a84 100644 (file)
@@ -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);