The package manager (apk or opkg) has no direct relevance to normal sysupgrade. The whole firmware gets updated and package manager has no role in it.
The possible hassle may come from package selection, if you use the quick&dirty firmware image cooking tools like owut, auc, attendedsysupgarde that may have inconsistensies in getting the right package manager included. But by default all the image should have right package manager of that release included in the image. (there has apparently been some trouble in the last few days reagrding that, but things should stabilize before 24.10.0 gets released)
And if you build your image from sources, it is right already now.
Just curious, why has OpenWrt not used opkg from the Yocto project, it seems to still be maintained? If the switch to apk is about the maintenance burden, that could have been an alternative.
The switch to apk will probably cause me major troubles, as I have a lot of code working around the limitation of opkg to do essentially distro upgrades/downgrades. Of course, I don't expect OpenWrt to take my troubles into account for the decision to switch to apk:-)
I was able to use the firmware selector with customize packages drop down to build a main snapshot image for my R5C.
I had to add iptables-zz-legacy before luci-app-sqm; avahi-nodbus-daemon before ksmbd-avahi-service; and libjpeg-turbo and libffmpeg-full before luci-app-minidlna in my package list though.
I presume this means there are some missing dependencies with luci-app-sqm, ksmbd-avahi-service and luci-app-minidlna following conversion to apk?
Standard sysupgrade should be completely drama free, as older, pre-apk snapshots are mostly identical to 24.10. I even set up my local ASU server to provide access to 24.10-SNAPSHOT, and done owut upgrades back and forth between the two version without any issues. (This worked for that short window after the 24.10 tagging and before the switch to apk on main, but it provides evidence that sysupgrades will not be an issue.)
Yes, there's no config changes between the two at all, so the config is even more stable than the actual code.
Where big "P" = package, big "D" = depends, little "p" = provides.
Since there could be multiple providers for iptables, maybe apk is getting confused and thus you must mention the -zz-legacy one before getting to sqm-scripts??? This was a bug in all of the ASU tools (FS, owut and server alike), where they all were sorting the package list before handing it off to imagebuilder, which with opkg caused exactly this sort of issue. I was hoping that apk would take care of it, but apparently not.
It could be that it's not apk but imagebuilder... If it's do apk add one-package for each package, rather than apk add all-packages, that might be the underlying cause; I'll have to dig into it when I get the time.
How does APK handle config files inside packages during upgrades?
For example OPKG while updating luci-base pkg, saves the config inside the pkg to /etc/config/luci-opkg in order to NOT OVERWRITE existing /etc/config/luci .
the issue will come up with normal building soon when we upgrade apk for a newer version which has arch validation. (we already had that for one day, but it was reveretd)
We have lots of script-only packages (most LuCI packages, database packages like 'ca-bundle' , script packages like 6in4 & 6rd4) that currently have PKGARCH:=all
Apk sets "noarch" as the always compatible arch, while in OpenWrt it is "all".
Looking at the apk source code, I think that the easiest way for us is to patch apk to also handle "all" like "noarch".
I would try to not add downstream patch in every way possible... Either we change and start setting noarch as the default arch or we add the noarch as the last entry in the arch file.
Upgrade a device with luci-attended-sysupgrade to the latest SNAPSHOT: SNAPSHOT r28124-efc0c4666b
Manually removing opkg and adding apk.
Device is running fine.
Broken now:
Attended-Sysupgrade with:
TypeError: Cannot read properties of undefined (reading 'luci-app-attendedsysupgrade')
OWUT with:
owut - OpenWrt Upgrade Tool 2024.11.14~3b5e7bb9-r1 (/usr/bin/owut)
ERROR: ubus: Not found: Failed to invoke function 'packagelist' on object 'rpc-sys'
from: 'ubus call rpc-sys packagelist { "all": true }'
This is a bug in 'owut/2024.11.14~3b5e7bb9-r1', please report at
https://github.com/efahl/owut/issues
...
apk update
fetch https://downloads.openwrt.org/snapshots/targets/ipq40xx/chromium/packages/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/targets/ipq40xx/chromium/packages/packages.adb: No such file or directory
...
The files are there, but apk is not able to fetch them.