main: bail if the entire depgraph cannot be built

pull/29/head
William Pitcock 2012-07-20 20:04:11 -05:00
parent 24236c76c1
commit d730ec8a64
1 changed files with 8 additions and 1 deletions

9
main.c
View File

@ -267,12 +267,19 @@ pkg_queue_walk(pkg_queue_t *head)
pkg_dependency_t *pkgdep;
pkgdep = pkg_dependency_parse(&world, pkgq->package);
world.requires = pkg_dependency_append(world.requires, pkgdep);
if (pkgdep != NULL)
world.requires = pkg_dependency_append(world.requires, pkgdep);
else
retval = EXIT_FAILURE;
free(pkgq->package);
free(pkgq);
}
/* we couldn't build the entire depgraph, so bail. */
if (retval != EXIT_SUCCESS)
goto out;
/* we should verify that the graph is complete before attempting to compute cflags etc. */
if (pkg_verify_graph(&world, maximum_traverse_depth, global_traverse_flags) != PKG_ERRF_OK)
{