Upgrade from RC2 to Final lost my packages?

Hey folks,

Is it expected that upgrading my firmware would lose my installed packages? I don't recall this happening with OpenWRT, though it released so rarely that it might've been the case. Is there a way to just re-get the packages that were installed prior to the build upgrade automatically?

Cheers,

Jonathan

It has always been that way. With sysupgrade you lose the separately installed packages.

Yes, that's to be expected if you used the precompiled images. That was the case with OpenWRT as well. The precompiled images are just the base system + luci.

EDIT: Too slow.

No problem, I wasn't sure. Thanks for clarifying!

Is there an easy way to list the friendly package names that are delta from the base image, then just pull them down again afterwards?

EDIT 2: Would installing them to another partition that's not trampled by sysupgrade allow them to stay installed and recognised by the update, or does opkg lose its state on every sysupgrade?

Solution 1:

  • List all installed packages: opkg list_installed | sed 's/ - .*//'
  • Save off that list, then install them after doing a sysupgrade

For option 2, it seems like I should be saving off files that I want to keep between sysupgrades to a USB drive.

1 Like

I think the right way is to build an image which already includes your packages.

Better use the image generator indeed to repackage your image, then flash that. Problem solved.

Also, we recommend you do not keep settings, to a void any strange issues. It's best to back up your configuration, then reconfigure from scratch with the old configuration as a reference.

1 Like

Keeping packages over a sysupgrade simply isn't possible, given that any installed kernel modules hard-depend on exactly the kernel version they were built against (and the kernel version differs between -rc2 and final), likewise any binaries linking against the libc (musl, in this case) or just about any other base library also have rather strict ABI dependencies (e.g. musl was updated during the -rc phase). This means even if these packages would remain installed over a sysupgrade, chances would be extremely high that any affected binaries would simply crash and burn, if you try to use them.

Desktop distributions (Debian/ Ubuntu, Fedora, OpenSUSE, ...) use way more complex dependency definitions (based on sonames, symbol versioning, ...) to allow in-place upgrades, but in order to support this reliably, much more effort would be needed for package/ library maintenance and also way more main storage (as in at least 300-500 MB + plus quite a bit wiggling room during the upgrade) to keep track of this safely.

Distributions, like LEDE, targetting deeply embedded devices with just 4-32 MB flash and little more RAM than that simply can't fit that into their flash - on top of that you have the problem that the existing bootloaders put additional constraints on the kernel (which needs to be in a specific place, making it impossible to install multiple kernels at once <-- required for in-place upgrades).

1 Like