libxbps: when sorting deps, add removed pkgs to head.
This commit is contained in:
parent
9fb3c38aa2
commit
eae6bf8ab4
@ -372,16 +372,23 @@ xbps_sort_pkg_deps(void)
|
|||||||
rv = ENOMEM;
|
rv = ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
TAILQ_INSERT_TAIL(&pkgdep_list, pd, pkgdep_entries);
|
if (strcmp(pd->trans, "remove") == 0) {
|
||||||
|
xbps_dbg_printf_append("added into head.");
|
||||||
|
TAILQ_INSERT_HEAD(&pkgdep_list, pd,
|
||||||
|
pkgdep_entries);
|
||||||
|
} else {
|
||||||
|
xbps_dbg_printf_append("added into tail.");
|
||||||
|
TAILQ_INSERT_TAIL(&pkgdep_list, pd,
|
||||||
|
pkgdep_entries);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Packages that don't have deps go unsorted, because
|
* Packages that don't have deps go at head, because
|
||||||
* it doesn't matter.
|
* it doesn't matter.
|
||||||
*/
|
*/
|
||||||
rundeps = prop_dictionary_get(obj, "run_depends");
|
rundeps = prop_dictionary_get(obj, "run_depends");
|
||||||
if (rundeps == NULL || prop_array_count(rundeps) == 0) {
|
if (rundeps == NULL || prop_array_count(rundeps) == 0) {
|
||||||
xbps_dbg_printf_append("added (no rundeps) into "
|
xbps_dbg_printf_append("\n");
|
||||||
"the sorted queue.\n");
|
|
||||||
cnt++;
|
cnt++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user