r = calloc(1, sizeof(struct pkg_repo));
r->name = strdup(repo->data.scalar.value);
asprintf(&r->name, "repo-%s", repo->data.scalar.value);
asprintf(&r->reponame, "repo-%s", repo->data.scalar.value);
r->url = strdup(url);
if (pubkey != NULL)
r->pubkey = strdup(pubkey);