Remove empty self replaced pkg arrays from pkgdb.

This commit is contained in:
Juan RP
2014-09-14 18:16:43 +02:00
parent ac2c517bd7
commit e902619220
2 changed files with 4 additions and 0 deletions

View File

@@ -65,6 +65,8 @@ check_pkg_unneeded(struct xbps_handle *xhp _unused, const char *pkgname, void *a
buf = xbps_xasprintf("%s>=0", pkgname);
xbps_remove_string_from_array(replaces, buf);
free(buf);
if (!xbps_array_count(replaces))
xbps_dictionary_remove(pkgd, "replaces");
}
return 0;