Skip to content

Commit

Permalink
Merge pull request #10 from tomprince/fix-merge-repo
Browse files Browse the repository at this point in the history
Fix mergerepo.
  • Loading branch information
Tojaj committed Oct 31, 2014
2 parents 8a375e2 + 516e3bd commit f1fe61f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mergerepo_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,9 @@ add_package(cr_Package *pkg,
// XXX: The first list element (pointed from hashtable) must stay first!
// g_slist_append() is suitable but non effective, insert a new element
// right after first element is optimal (at least for now)
assert(g_slist_insert(list, pkg, 1) == list);
if (g_slist_insert(list, pkg, 1) != list) {
assert(0);
}

return 1;
}
Expand Down Expand Up @@ -933,6 +935,9 @@ merge_repos(GHashTable *merged,
}
}

g_debug("Reading metadata for %s (%s-%s.%s)",
pkg->name, pkg->version, pkg->release, pkg->arch);

// Add package
ret = add_package(pkg,
repopath,
Expand Down Expand Up @@ -1142,6 +1147,9 @@ dump_merged_metadata(GHashTable *merged_hashtable,
pkg = (cr_Package *) element->data;
res = cr_xml_dump(pkg, NULL);

g_debug("Writing metadata for %s (%s-%s.%s)",
pkg->name, pkg->version, pkg->release, pkg->arch);

cr_xmlfile_add_chunk(pri_f, (const char *) res.primary, NULL);
cr_xmlfile_add_chunk(fil_f, (const char *) res.filelists, NULL);
cr_xmlfile_add_chunk(oth_f, (const char *) res.other, NULL);
Expand Down

0 comments on commit f1fe61f

Please sign in to comment.