[PATCH opkg] libopkg: pkg_hash: print unresolved dependencies

Philip Prindeville philipp_subx at redfish-solutions.com
Wed May 5 19:11:34 BST 2021



> On May 2, 2021, at 5:13 PM, Daniel Golle <daniel at makrotopia.org> wrote:
> 
> On Sun, May 02, 2021 at 10:59:12PM +0200, Hauke Mehrtens wrote:
>> 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: can not find dependency ltq-dsl-base for ltq-vdsl-app
>> 
>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> ---
>> 
>> I am not sure if this would happen in normal cases too and spam the 
>> error log, I only saw this in an error case.
>> 
>> libopkg/pkg_hash.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
>> index a07a25e..6c04ab2 100644
>> --- a/libopkg/pkg_hash.c
>> +++ b/libopkg/pkg_hash.c
>> @@ -263,8 +263,10 @@ pkg_hash_check_unresolved(pkg_t *maybe)
>> 	if (unresolved) {
>> 		res = 1;
>> 		tmp = unresolved;
>> -		while (*tmp)
>> +		while (*tmp) {
>> +			opkg_msg(ERROR, "can not find dependency %s for %s\n", *tmp, maybe->name);
>                                        ^^^^^^^^^
> Should be 'cannot', it's spelled as one word in English (natives:
> correct me if I'm wrong!)


Correct.


> 
>> 			free(*(tmp++));
>> +		}
>> 		free(unresolved);
>> 	}
>> 	pkg_vec_free(depends);
>> -- 
>> 2.30.2
>> 
>> 
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel




More information about the openwrt-devel mailing list