What is missing for opkg -> apk switch [Was: Re: OpenWrt 24.XX release plan]

Hannu Nyman hannu.nyman at iki.fi
Sat Oct 26 11:07:51 PDT 2024


I have noticed two problems in my own testing:

1)

I think that the ALTERNATIVES supports in our apk might be faulty, at least 
at the image generation in the build system.
I have filed a bug for that:

apk: ALTERNATIVES support at build stage seems faulty
https://github.com/openwrt/openwrt/issues/16795

Good example is GNU wget and uclient-fetch, the lightweight wget alternative 
in OpenWrt.
6in4 depends on uclient-fetch, so trying to include that together with wget 
causes errors.

|ERROR: unable to select packages: uclient-fetch-2024.10.22~88ae8f20-r1: 
conflicts: wget-ssl-1.24.5-r1[wget=2024.10.22~88ae8f20-r1] satisfies: 
world[uclient-fetch] 6in4-29[uclient-fetch] wget-ssl-1.24.5-r1: conflicts: 
uclient-fetch-2024.10.22~88ae8f20-r1[wget=1.24.5-r1] satisfies: 
world[wget-ssl] make[2]: *** [package/Makefile:99: package/install] Error 3 |

Both packages declare themselves as |ALTERNATIVES |for |/usr/bin/wget| but 
apparently apk ignores that.

perus at ub2410:/OpenWrt/aarch64$ grep ALTERNATIVES package/libs/uclient/Makefile
   ALTERNATIVES:=200:/usr/bin/wget:/bin/uclient-fetch
perus at ub2410:/OpenWrt/aarch64$ grep ALTERNATIVES 
feeds/packages/net/wget/Makefile
   ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-ssl
   ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-nossl

||2)

Testing in a live system is problematic, as apk fails to read its own 
database of installed packages:

apk fails to read its own database: FDB format error
https://github.com/openwrt/openwrt/issues/16794

|root at router6000:/lib/apk/db# apk info ERROR: FDB format error (line 6860, 
entry 'F') ERROR: Unable to read database: v2 database format error ERROR: 
Failed to open apk database: v2 database format error root at router6000:~# less 
-N /lib/apk/db/installed 6854 U:https://www.openssl.org/ 6855 L:Apache-2.0 
6856 o:feeds/base/libs/openssl 6857 m:Eneas U de Queiroz 
<cotequeiroz at gmail.com> 6858 c: 6859 D:libc libopenssl3 6860 F:etc 6861 
F:etc/config 6862 R:openssl 6863 
Z:Q247DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= 6864 F:etc/init.d 6865 
R:openssl 6866 a:0:0:755 6867 Z:Q2K3nUsjzYTwbSQIAcrvqq7gqnCnrl1bW4fk9q3gw1Zv8= |




More information about the openwrt-devel mailing list