}
static int pakfire_repo_metadata_add_file(struct pakfire_repo* self,
- struct json_object* repomd, const char* path) {
+ struct json_object* repomd, const char* type, const char* path) {
struct pakfire_digests digests = {};
struct json_object* files = NULL;
struct json_object* file = NULL;
goto ERROR;
}
+ // Add the type
+ r = pakfire_json_add_string(file, "type", type);
+ if (r < 0)
+ goto ERROR;
+
// Add the filename
r = pakfire_json_add_string(file, "filename", filename);
if (r < 0)
}
// Add the database to the filelist
- r = pakfire_repo_metadata_add_file(self, repomd, path);
+ r = pakfire_repo_metadata_add_file(self, repomd, "packages", path);
if (r < 0)
goto ERROR;