# Main
-main: parsepkg.o parsehdr.o package.o xml_dump.o xml_dump_primary.o xml_dump_filelists.o xml_dump_other.o misc.o load_metadata_2.o
- gcc $(LINKFLAGS) $(CFLAGS) parsepkg.o parsehdr.o package.o xml_dump.o xml_dump_primary.o xml_dump_filelists.o xml_dump_other.o misc.o load_metadata_2.o main.c -o main
+main: parsepkg.o parsehdr.o package.o xml_dump.o xml_dump_primary.o xml_dump_filelists.o xml_dump_other.o misc.o load_metadata_2.o repomd.o
+ gcc $(LINKFLAGS) $(CFLAGS) parsepkg.o parsehdr.o package.o xml_dump.o xml_dump_primary.o xml_dump_filelists.o xml_dump_other.o misc.o repomd.o load_metadata_2.o main.c -o main
clean:
out_dir[i+1] = '/';
}
- out_repo = g_strconcat(cmd_options.outputdir, "repodata/", NULL);
+ out_repo = g_strconcat(out_dir, "repodata/", NULL);
} else {
out_dir = g_strdup(in_dir);
out_repo = g_strdup(in_repo);
#define GZ_BUFFER_SIZE 131072 // 1024*128
+#define RPM_NS "http://linux.duke.edu/metadata/rpm"
+#define XMLNS_NS "http://linux.duke.edu/metadata/repo"
+
typedef struct _contentStat {
char *checksum;
int rc;
- rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
+ rc = xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL);
if (rc < 0) {
g_critical("Error at xmlTextWriterStartDocument\n");
return NULL;
g_critical("Error at xmlTextWriterStartElement repomd\n");
return NULL;
}
+ xmlTextWriterWriteAttribute(writer, BAD_CAST "xmlns:rpm", RPM_NS);
+ xmlTextWriterWriteAttribute(writer, BAD_CAST "xmlns", XMLNS_NS);
rc = xmlTextWriterStartElement(writer, BAD_CAST "revision");
if (rc < 0) {