pkg: if pkg_traverse() fails, abort walking the graph.

feature/tap-sh
William Pitcock 2012-05-11 21:01:42 -05:00
parent 298a37868c
commit db9f626790
1 changed files with 4 additions and 1 deletions

5
pkg.c
View File

@ -603,8 +603,11 @@ pkg_walk_list(pkg_dependency_t *deplist,
return pkg_report_graph_error(pkgdep, node, eflags);
eflags = pkg_traverse(pkgdep, func, data, depth - 1, flags);
pkg_free(pkgdep);
/* optimization: if a break has been found in the depgraph, quit walking it */
if (eflags != PKG_ERRF_OK)
break;
}
return eflags;