Make xbps_remove_pkg_from_* use shared code, and add another variant.

The functions have been renamed to really match what they do.
This commit is contained in:
Juan RP
2011-01-27 18:22:57 +01:00
parent 93e1a0a22c
commit faad0a6597
5 changed files with 62 additions and 59 deletions

View File

@ -163,7 +163,8 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir,
rv = errno;
goto out;
}
if (!xbps_remove_pkg_from_dict(idxdict, "packages", pkgname)) {
if (!xbps_remove_pkg_from_dict_by_name(idxdict,
"packages", pkgname)) {
fprintf(stderr, "E: couldn't remove %s dict from "
"index (%s)\n", pkgname, strerror(errno));
prop_object_release(newpkgd);