+#define REPODATAFILE_BLOCK 15
+
+static void
+write_info(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata, Repodata *info, const char *location)
+{
+ Id h;
+ Queue keyq;
+
+ queue_init(&keyq);
+ if (repo_write_filtered(repo, fp, keyfilter, kfdata, &keyq) != 0)
+ {
+ fprintf(stderr, "repo_write failed\n");
+ exit(1);
+ }
+ h = repodata_new_handle(info);
+ if (keyq.count)
+ repodata_set_idarray(info, h, REPOSITORY_KEYS, &keyq);
+ queue_free(&keyq);
+ repodata_set_str(info, h, REPOSITORY_LOCATION, location);
+ repodata_add_flexarray(info, SOLVID_META, REPOSITORY_EXTERNAL, h);
+}
+
+void