base-files: add sysupgrade -k to save list of pkgs
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 17 Aug 2018 23:49:53 +0000 (20:49 -0300)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:24 +0000 (17:48 +0100)
commit7aa79b1ea97ce40fa9bd86bdabf6166bbfab409a
treeb185e5a5104ac54b884c72719a650300b50aa26b
parent78526ab6d393017d3421255cf4458454db3e4518
base-files: add sysupgrade -k to save list of pkgs

When '-k' is used, sysupgrade inserts into backup a new file
/etc/backup/installed_packages.txt which contains pkgname and origin (rom,
overlay, unknown) without touching rootfs.

It's mainly used to reinstall all extra packages:

 # opkg update
 # grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg install
 # rm /etc/backup/installed_packages.txt

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(backported from 5cb1dce542a6a13fd250e9ef9c8290568c610c39)
package/base-files/files/sbin/sysupgrade