X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_hash.c;h=d6a062dc91d9f439a9728eb17c29894b0c889091;hp=a2766284e82282c917e37ca69db4c3847878d181;hb=4a5627af1ecf0061c99409f4a3b4e84de5e58f30;hpb=38171e005d8bc496389bccdf8b9f8449b7b227a5 diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index a276628..d6a062d 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -47,7 +47,6 @@ static abstract_pkg_t * add_new_abstract_pkg_by_name(hash_table_t * hash, const */ - int pkg_hash_init(const char *name, hash_table_t *hash, int len) { return hash_table_init(name, hash, len); @@ -297,7 +296,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf, abstract_pk 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; } @@ -648,10 +647,13 @@ int file_hash_set_file_owner(opkg_conf_t *conf, const char *file_name, pkg_t *ow // 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; }