]> git.ipfire.org Git - pakfire.git/commitdiff
repos: Don't worry about our repodata
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 26 Oct 2022 20:48:26 +0000 (20:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 26 Oct 2022 20:48:26 +0000 (20:48 +0000)
This will be implicitely created by libsolv.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index dfbf158cca17c87dd77b3200fcfd25b1c6fd989c..dc83019cc7fdee64957868046fceb42182f4575f 100644 (file)
@@ -55,8 +55,6 @@
 #define REFRESH_AGE_METADATA                   600
 
 struct pakfire_repo_appdata {
-       Repodata* repodata;
-
        char* description;
        char* baseurl;
 
@@ -593,14 +591,6 @@ PAKFIRE_EXPORT struct pakfire* pakfire_repo_get_pakfire(struct pakfire_repo* rep
 int pakfire_repo_clear(struct pakfire_repo* repo) {
        repo_empty(repo->repo, 0);
 
-       // Allocate repodata
-       repo->appdata->repodata = repo_add_repodata(repo->repo,
-               REPO_EXTEND_SOLVABLES|REPO_NO_INTERNALIZE|REPO_NO_LOCATION);
-       if (!repo->appdata->repodata) {
-               ERROR(repo->pakfire, "Could not allocate repodata\n");
-               return 1;
-       }
-
        return 0;
 }
 
@@ -609,7 +599,7 @@ Repo* pakfire_repo_get_repo(struct pakfire_repo* repo) {
 }
 
 Repodata* pakfire_repo_get_repodata(struct pakfire_repo* repo) {
-       return repo->appdata->repodata;
+       return repo_last_repodata(repo->repo);
 }
 
 PAKFIRE_EXPORT int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {