Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2021-10-05 10:46:50 +0300
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2022-01-04 14:30:34 +0300
commit09ff4b4b404d3f3b41c9bd051eafcef0e081394d (patch)
treeea257e9d1195c5d9bf41289df3f05223a005316a
parentc4a37388464521fa7a3c005eb2ab7300efa00675 (diff)
Store parsed repomd in `cr_MetadataLocation`
We want to later use it to check if it matches the new repomd.
-rw-r--r--src/locate_metadata.c7
-rw-r--r--src/locate_metadata.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/locate_metadata.c b/src/locate_metadata.c
index de42cc6..03e2630 100644
--- a/src/locate_metadata.c
+++ b/src/locate_metadata.c
@@ -60,6 +60,10 @@ cr_metadatalocation_free(struct cr_MetadataLocation *ml)
cr_remove_dir(ml->local_path, NULL);
}
+ if (ml->repomd_data) {
+ cr_repomd_free(ml->repomd_data);
+ }
+
g_free(ml->pri_xml_href);
g_free(ml->fil_xml_href);
g_free(ml->oth_xml_href);
@@ -146,6 +150,7 @@ cr_parse_repomd(const char *repomd_path,
mdloc = g_malloc0(sizeof(struct cr_MetadataLocation));
mdloc->repomd = g_strdup(repomd_path);
mdloc->local_path = g_strdup(repopath);
+ mdloc->repomd_data = repomd;
for (GSList *elem = repomd->records; elem; elem = g_slist_next(elem)) {
cr_RepomdRecord *record = elem->data;
@@ -179,8 +184,6 @@ cr_parse_repomd(const char *repomd_path,
g_free(full_location_href);
}
- cr_repomd_free(repomd);
-
return mdloc;
}
diff --git a/src/locate_metadata.h b/src/locate_metadata.h
index ef3c3e4..738e743 100644
--- a/src/locate_metadata.h
+++ b/src/locate_metadata.h
@@ -21,6 +21,7 @@
#define __C_CREATEREPOLIB_LOCATE_METADATA_H__
#include <glib.h>
+#include "repomd.h"
#ifdef __cplusplus
extern "C" {
@@ -50,6 +51,7 @@ struct cr_MetadataLocation {
int tmp; /*!< if true - metadata were downloaded and
will be removed during
cr_metadata_location_free*/
+ cr_Repomd *repomd_data; /*!< parsed repomd */
};
/** Structure representing additional metadata location and type.