summaryrefslogtreecommitdiffstats
path: root/libopkg/pkg_hash.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-27 00:32:37 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-27 00:32:37 (EST)
commit9656d4499de22e10b079c249b70e4dc9ef8e7970 (patch)
tree2995330cb57aeb69bffab49a77b98c713f7439ad /libopkg/pkg_hash.c
parent7ea0060e3b5c0f4d261cf4291bcd160ec94164c2 (diff)
Finding a provider which is has an incompatible arch should not prevent
the installation of others which are compatible. git-svn-id: http://opkg.googlecode.com/svn/trunk@396 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/pkg_hash.c')
-rw-r--r--libopkg/pkg_hash.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
index 3259eef..ccd3197 100644
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
@@ -166,6 +166,7 @@ pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf,
int i;
int nprovides = 0;
int nmatching = 0;
+ int wrong_arch_found = 0;
pkg_vec_t *matching_pkgs;
abstract_pkg_vec_t *matching_apkgs;
abstract_pkg_vec_t *provided_apkg_vec;
@@ -253,14 +254,22 @@ pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf,
}
if (vec->len > 0 && matching_pkgs->len < 1)
- {
- opkg_message (conf, OPKG_ERROR, "Packages were found, but none compatible with the architectures configured\n");
- if (err)
- *err = -1;
- }
+ wrong_arch_found = 1;
}
}
+ if (matching_pkgs->len < 1) {
+ if (wrong_arch_found)
+ opkg_message (conf, OPKG_ERROR, "Packages for %s found, but"
+ " incompatible with the architectures configured\n",
+ apkg->name);
+ pkg_vec_free(matching_pkgs);
+ abstract_pkg_vec_free(matching_apkgs);
+ abstract_pkg_vec_free(providers);
+ return NULL;
+ }
+
+
if (matching_pkgs->len > 1)
pkg_vec_sort(matching_pkgs, pkg_name_version_and_architecture_compare);
if (matching_apkgs->len > 1)