libopkg: pkg_hash: print unresolved dependencies
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 2 May 2021 20:46:02 +0000 (22:46 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 13 Jun 2021 21:27:37 +0000 (23:27 +0200)
When a package is not installed because it has unresolved dependencies
normally we get only an error message like this:
 * pkg_hash_fetch_best_installation_candidate: Packages for ltq-vdsl-app found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package ltq-vdsl-app.

Log in addition the following error message:
 * pkg_hash_check_unresolved: cannot find dependency ltq-dsl-base for ltq-vdsl-app

Fixes: FS#3814
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
libopkg/pkg_hash.c

index a07a25ec1e0b40f8e194a27e7286643b93a048cf..c58703f60e663de224b93aabaa61901cd841e560 100644 (file)
@@ -263,8 +263,10 @@ pkg_hash_check_unresolved(pkg_t *maybe)
        if (unresolved) {
                res = 1;
                tmp = unresolved;
-               while (*tmp)
+               while (*tmp) {
+                       opkg_msg(ERROR, "cannot find dependency %s for %s\n", *tmp, maybe->name);
                        free(*(tmp++));
+               }
                free(unresolved);
        }
        pkg_vec_free(depends);