Skip to content

Sync operation doesn't remove pattern when source is empty #5

@cottsay

Description

@cottsay

When performing a --sync operation from another repository, there's a "shortcut" in the logic which returns early if there were no packages found in the source repository matching the sync pattern. While this makes some sense, the result is that the pattern-based invalidation which would have removed all packages from the downstream repository matching the pattern doesn't occur.

if (pattern) {
g_hash_table_iter_init(&iter, packages);
while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&package)) {
if (!g_regex_match(pattern, package->name, 0, NULL)) {
g_hash_table_iter_remove(&iter);
}
}
}
if (!g_hash_table_size(packages)) {
g_string_free(url, TRUE);
cr_metadata_free(md);
return CRE_OK;
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions