What happens to installed packages on a sysupgrade in OpenWRT?

I've just upgraded my OpenWRT router from 10.03.1-rc4 to rc5 (testing).

It looks like all my installed packages are gone. Is that the expected behaviour? If yes, I should be able to just reinstalled them and load the configs from the backup, correct?


Solution 1:

The OpenWRT Wiki says you can't keep existing binaries, but need to reinstall them.

In particular, any manually installed software packages you may have installed after the initial OpenWrt installation have to be reinstalled after an OpenWrt upgrade. That way everything will match, e.g. the updated Linux kernel and any installed kernel modules.

Any configuration files or data files placed in locations not specifically listed as being preserved below will also be lost in an OpenWrt upgrade. Be sure to check any files you have added or customized from a default OpenWrt install to back up these items before an upgrade.

However, Tolaris gives the following command to take a list of your installed packages:

opkg list-installed | cut -f 1 -d ' '

Solution 2:

You can backup your list of installed packages:

opkg list-installed | cut -f 1 -d ' ' > /etc/config/packages.list

(Put it into /etc/config folder so it will get retained between firmware updates)

and then after the update:

cat /etc/config/packages.list | opkg install