When sorting packages also look for virtual packages.
A new function xbps_find_virtual_pkg_in_dict() has been made public to the API to make this find duplicate packages in the transaction when updating packages.
This commit is contained in:
12
lib/plist.c
12
lib/plist.c
@@ -233,10 +233,10 @@ out:
|
||||
return rpkgd;
|
||||
}
|
||||
|
||||
static bool
|
||||
find_virtual_pkg_in_dict(prop_dictionary_t d,
|
||||
const char *str,
|
||||
bool bypattern)
|
||||
bool
|
||||
xbps_find_virtual_pkg_in_dict(prop_dictionary_t d,
|
||||
const char *str,
|
||||
bool bypattern)
|
||||
{
|
||||
prop_array_t provides;
|
||||
bool found = false;
|
||||
@@ -273,14 +273,14 @@ find_pkg_in_dict(prop_dictionary_t d,
|
||||
"pkgver", &pkgver);
|
||||
if (xbps_pkgpattern_match(pkgver, __UNCONST(str)))
|
||||
break;
|
||||
if (find_virtual_pkg_in_dict(obj, str, true))
|
||||
if (xbps_find_virtual_pkg_in_dict(obj, str, true))
|
||||
break;
|
||||
} else {
|
||||
prop_dictionary_get_cstring_nocopy(obj,
|
||||
"pkgname", &dpkgn);
|
||||
if (strcmp(dpkgn, str) == 0)
|
||||
break;
|
||||
if (find_virtual_pkg_in_dict(obj, str, false))
|
||||
if (xbps_find_virtual_pkg_in_dict(obj, str, false))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user