xbps_alternatives_register: fix test case "more_entries_update".

Even if the alternatives group is already registered, we need
to create the symlinks from current pkg dictionary (repo).

Signed-off-by: Juan RP <xtraeme@gmail.com>
This commit is contained in:
Juan RP 2019-06-11 16:34:25 +02:00 committed by Duncan Overbruck
parent d021698365
commit d189921818

View File

@ -472,7 +472,14 @@ xbps_alternatives_register(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod)
array = xbps_array_create();
} else {
/* already registered */
if (xbps_match_string_in_array(array, pkgname))
if (xbps_match_string_in_array(array, pkgname)) {
/* apply alternatives for this group */
rv = create_symlinks(xhp,
xbps_dictionary_get(pkg_alternatives, keyname),
keyname);
if (rv != 0)
break;
}
continue;
}
@ -485,6 +492,7 @@ xbps_alternatives_register(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod)
rv = create_symlinks(xhp,
xbps_dictionary_get(pkg_alternatives, keyname),
keyname);
if (alloc)
xbps_object_release(array);
if (rv != 0)
break;