Treat pkgs with NULL or empty requiredby arrays as orphans.
This commit is contained in:
parent
f2ef0c0050
commit
2c644c6587
@ -97,13 +97,10 @@ find_orphan_pkg(prop_object_t obj, void *arg, bool *loop_done)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
reqby = prop_dictionary_get(obj, "requiredby");
|
reqby = prop_dictionary_get(obj, "requiredby");
|
||||||
if (prop_object_type(reqby) != PROP_TYPE_ARRAY)
|
if (reqby == NULL || ((cnt = prop_array_count(reqby)) == 0)) {
|
||||||
return EINVAL;
|
/*
|
||||||
/*
|
* Add packages with empty or missing "requiredby" arrays.
|
||||||
* Add packages with empty "requiredby" arrays.
|
*/
|
||||||
*/
|
|
||||||
cnt = prop_array_count(reqby);
|
|
||||||
if (cnt == 0) {
|
|
||||||
prop_array_add(od->array, obj);
|
prop_array_add(od->array, obj);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user