X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_hash.c;h=c63847b520f6e40005bad1a6b67532e2e3c66b90;hp=97613e5c6ea5275ab4eed4a430647ae0d8789024;hb=b70dc315e405d3c59dae2a795462f85d02cbb8df;hpb=6b7a2a530a5fdd990264466882528c9db8c6ae0b diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 97613e5..c63847b 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -648,10 +648,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; }