summaryrefslogtreecommitdiff
path: root/meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch')
-rw-r--r--meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch b/meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch
new file mode 100644
index 0000000..07e0017
--- /dev/null
+++ b/meta-openvuplus/recipes-devtools/opkg/opkg/0002-pkg_hash_fetch_conflicts-take-into-account-conflicts.patch
@@ -0,0 +1,35 @@
+diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
+index de105bf..0089463 100644
+--- a/libopkg/pkg_depends.c
++++ b/libopkg/pkg_depends.c
+@@ -435,6 +435,22 @@ static pkg_vec_t * __pkg_hash_fetch_conflicts(pkg_t * pkg, pkg_t * installed_con
+ }
+ }
+
++static void __pkg_hash_fetch_conflictees(pkg_t *pkg, pkg_vec_t *installed_conflicts)
++{
++ int i;
++
++ pkg_vec_t *available_pkgs = pkg_vec_alloc();
++ pkg_hash_fetch_all_installed(available_pkgs);
++
++ for (i = 0; i < available_pkgs->len; i++) {
++ pkg_t *cpkg = available_pkgs->pkgs[i];
++ if (pkg_conflicts(cpkg, pkg) && !is_pkg_in_pkg_vec(installed_conflicts, cpkg))
++ pkg_vec_insert(installed_conflicts, cpkg);
++ }
++
++ pkg_vec_free(available_pkgs);
++}
++
+ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
+ {
+ pkg_vec_t * installed_conflicts;
+@@ -452,6 +468,7 @@ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
+ installed_conflicts = pkg_vec_alloc();
+
+ __pkg_hash_fetch_conflicts(pkg, installed_conflicts);
++ __pkg_hash_fetch_conflictees(pkg, installed_conflicts);
+
+ if (installed_conflicts->len)
+ return installed_conflicts;