1 diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
2 index 512d17f..ca3acbe 100644
3 --- a/libopkg/pkg_depends.c
4 +++ b/libopkg/pkg_depends.c
5 @@ -369,40 +369,22 @@ is_pkg_a_replaces(pkg_t *pkg_scout,pkg_t *pkg)
9 -pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
10 +static void __pkg_hash_fetch_conflicts(pkg_t * pkg, pkg_vec_t * installed_conflicts)
12 - pkg_vec_t * installed_conflicts, * test_vec;
13 + pkg_vec_t * test_vec;
14 compound_depend_t * conflicts;
15 depend_t ** possible_satisfiers;
16 depend_t * possible_satisfier;
19 - abstract_pkg_t * ab_pkg;
24 - * this is a setup to check for redundant/cyclic dependency checks,
25 - * which are marked at the abstract_pkg level
27 - if(!(ab_pkg = pkg->parent)){
28 - opkg_msg(ERROR, "Internal error: %s not in hash table\n", pkg->name);
29 - return (pkg_vec_t *)NULL;
32 conflicts = pkg->conflicts;
34 - return (pkg_vec_t *)NULL;
36 - installed_conflicts = pkg_vec_alloc();
38 - count = pkg->conflicts_count;
44 /* foreach conflict */
45 for(i = 0; i < pkg->conflicts_count; i++){
47 possible_satisfiers = conflicts->possibilities;
49 /* foreach possible satisfier */
50 @@ -438,11 +420,30 @@ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
56 +pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
58 + pkg_vec_t * installed_conflicts;
59 + abstract_pkg_t * ab_pkg;
62 + * this is a setup to check for redundant/cyclic dependency checks,
63 + * which are marked at the abstract_pkg level
65 + if(!(ab_pkg = pkg->parent)){
66 + opkg_msg(ERROR, "Internal error: %s not in hash table\n", pkg->name);
67 + return (pkg_vec_t *)NULL;
70 + installed_conflicts = pkg_vec_alloc();
72 + __pkg_hash_fetch_conflicts(pkg, installed_conflicts);
74 if (installed_conflicts->len)
75 return installed_conflicts;
76 pkg_vec_free(installed_conflicts);
77 - return (pkg_vec_t *)NULL;
78 + return (pkg_vec_t *)NULL;
81 int version_constraints_satisfied(depend_t * depends, pkg_t * pkg)