From 4136443a3a7413ccaa230e023a37084ac1f4d570 Mon Sep 17 00:00:00 2001 From: pixdamix@gmail.com Date: Thu, 22 Nov 2012 04:18:02 -0500 Subject: detect circular dependencies Add logic to detect circular dependencies. If we see any dependency from any given parent twice, ignore it the second time and print a notice message that we did so. Signed-off-by: Richard Purdie Signed-off-by: Martin Jansa git-svn-id: http://opkg.googlecode.com/svn/trunk@641 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/pkg_depends.c') diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c index 208b934..d45f697 100644 --- a/libopkg/pkg_depends.c +++ b/libopkg/pkg_depends.c @@ -30,7 +30,6 @@ static int parseDepends(compound_depend_t *compound_depend, char * depend_str); static depend_t * depend_init(void); static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx); static char ** merge_unresolved(char ** oldstuff, char ** newstuff); -static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg); static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata) { @@ -531,7 +530,7 @@ int pkg_dependence_satisfied(depend_t *depend) return 0; } -static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg) +int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg) { int i; pkg_t ** pkgs = vec->pkgs; -- cgit v0.9.1