Remove empty self replaced pkg arrays from pkgdb.
This commit is contained in:
parent
ac2c517bd7
commit
e902619220
@ -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;
|
||||
|
@ -110,6 +110,8 @@ xbps_register_pkg(struct xbps_handle *xhp, xbps_dictionary_t pkgrd)
|
||||
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");
|
||||
}
|
||||
if (!xbps_dictionary_set(xhp->pkgdb, pkgname, pkgd)) {
|
||||
xbps_dbg_printf(xhp,
|
||||
|
Loading…
Reference in New Issue
Block a user