*/
-\f
int pkg_hash_init(const char *name, hash_table_t *hash, int len)
{
return hash_table_init(name, hash, len);
if (vec->len > 0 && matching_pkgs->len < 1)
{
- opkg_message (conf, OPKG_ERROR, " Packages found, but none available for the current "
- "architecture\n");
+ opkg_message (conf, OPKG_ERROR, "Packages were found, but none compatible with the architectures configured\n");
if (err)
*err = OPKG_PKG_HAS_NO_AVAILABLE_ARCH;
}
latest_installed_parent = matching;
if (matching->state_flag & (SF_HOLD|SF_PREFER)) {
if (held_pkg)
- opkg_message(conf, OPKG_ERROR, "Multiple packages (%s and %s) providing same name marked HOLD or PREFER. Using latest.\n",
+ opkg_message(conf, OPKG_NOTICE, "Multiple packages (%s and %s) providing same name marked HOLD or PREFER. Using latest.\n",
held_pkg->name, matching->name);
held_pkg = matching;
}
}
}
-static int pkg_compare_names(const void *p1, const void *p2)
-{
- const pkg_t *pkg1 = *(const pkg_t **)p1;
- const pkg_t *pkg2 = *(const pkg_t **)p2;
- if (pkg1->name == NULL)
- return 1;
- if (pkg2->name == NULL)
- return -1;
- return(strcmp(pkg1->name, pkg2->name));
-}
-
static void pkg_hash_fetch_available_helper(const char *pkg_name, void *entry, void *data)
{
void pkg_hash_fetch_available(hash_table_t *hash, pkg_vec_t *all)
{
hash_table_foreach(hash, pkg_hash_fetch_available_helper, all);
- qsort(all->pkgs, all->len, sizeof(pkg_t *), pkg_compare_names);
}
static void pkg_hash_fetch_all_installed_helper(const char *pkg_name, void *entry, void *data)
void pkg_hash_fetch_all_installed(hash_table_t *hash, pkg_vec_t *all)
{
hash_table_foreach(hash, pkg_hash_fetch_all_installed_helper, all);
- qsort(all->pkgs, all->len, sizeof(void*), pkg_compare_names);
}
static void pkg_hash_dump_helper(const char *pkg_name, void *entry, void *data)
// opkg_message(conf, OPKG_DEBUG2, "owning_pkg=%s filename=%s\n", owning_pkg->name, file_name);
hash_table_insert(file_hash, file_name, owning_pkg);
if (old_owning_pkg) {
+ pkg_get_installed_files(old_owning_pkg);
str_list_remove_elt(old_owning_pkg->installed_files, file_name);
+ pkg_free_installed_files(old_owning_pkg);
/* mark this package to have its filelist written */
old_owning_pkg->state_flag |= SF_FILELIST_CHANGED;
owning_pkg->state_flag |= SF_FILELIST_CHANGED;
+
}
return 0;
}