pkgdb: repository-origin -> repository to match the repo pkg obj.

This commit is contained in:
Juan RP
2014-09-13 10:49:13 +02:00
parent 287665009b
commit 411480e43d
2 changed files with 14 additions and 1 deletions

View File

@ -46,11 +46,17 @@ int
check_pkg_unneeded(struct xbps_handle *xhp _unused, const char *pkgname _unused, void *arg)
{
xbps_dictionary_t pkgd = arg;
const char *repo = NULL;
xbps_dictionary_remove(pkgd, "download");
xbps_dictionary_remove(pkgd, "remove-and-update");
xbps_dictionary_remove(pkgd, "transaction");
xbps_dictionary_remove(pkgd, "skip-obsoletes");
xbps_dictionary_get_cstring_nocopy(pkgd, "repository-origin", &repo);
if (repo) {
xbps_dictionary_set_cstring(pkgd, "repository", repo);
xbps_dictionary_remove(pkgd, "repository-origin");
}
return 0;
}