summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2014-03-12 09:25:58 (EDT)
committer Paul Barker <paul@paulbarker.me.uk>2014-03-18 08:28:00 (EDT)
commitb634d68b94652470582a11a3406ebaf7cf34b9e5 (patch)
tree853de36eeda0df11f860be38e951ec6db06a0caf /libopkg
parent875afa0f9d049a9f1fcd3f89aabd8aa28c89e8d7 (diff)
pkg_hash: Fix invalid architecture notices
If pkg->architecture is NULL, the message "no valid architecture" is correct. However if pkg->architecture is not NULL but pkg->arch_priority is zero, then the architecture is valid but is not compatible with the current system. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg_hash.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
index 4bc0c3a..4618869 100644
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
@@ -137,7 +137,7 @@ pkg_hash_add_from_file(const char *file_name,
continue;
}
- if (!pkg->architecture || !pkg->arch_priority) {
+ if (!pkg->architecture) {
char *version_str = pkg_version_str_alloc(pkg);
opkg_msg(NOTICE, "Package %s version %s has no "
"valid architecture, ignoring.\n",
@@ -145,6 +145,14 @@ pkg_hash_add_from_file(const char *file_name,
free(version_str);
continue;
}
+ if (!pkg->arch_priority) {
+ char *version_str = pkg_version_str_alloc(pkg);
+ opkg_msg(DEBUG, "Package %s version %s is built for architecture %s "
+ "which cannot be installed here, ignoring.\n",
+ pkg->name, version_str, pkg->architecture);
+ free(version_str);
+ continue;
+ }
hash_insert_pkg(pkg, is_status_file);