Avoid endless loop while sorting dependencies due to missing packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100129034440-c1c9q0o5b0r1hhh2
This commit is contained in:
Juan RP
2010-01-29 04:44:40 +01:00
parent 83ab3fe977
commit 2daffcc768
2 changed files with 16 additions and 1 deletions

View File

@ -205,6 +205,14 @@ xbps_repository_get_transaction_dict(void)
* Sort package list if necessary.
*/
if ((rv = xbps_sort_pkg_deps(trans_dict)) != 0) {
/*
* If there are missing deps (errno==ENOENT)
* return the dictionary, the client should always
* check if that's the case.
*/
if (errno == ENOENT)
return trans_dict;
errno = rv;
return NULL;
}