IDing user-installed packages on LEDE 17.01.4

I would like to upgrade my TP-Link Archer C7 to OpenWrt 18.06.

Following the documentation here, I am supposed to run the provided scripts to identify user-installed packages, so that I can re-install them post-upgrade.

Unfortunately, the script is showing 88 of the 92 packages on my system as user-installed, which isn't exactly helpful. Is there an updated way to do this somewhere?

There's a one-liner further down:

find /overlay/upper/ | sed s:/overlay/upper::g | while read file; do opkg search $file; done | awk '{print $1}' | sort | uniq

Unfortunately it will also include any package where the config is changed. You can remove those by adding grep -v '/overlay/upper/etc' as the second command, but then you will also exclude packages which only adds config files. A more advanced version could check that all of files in the packages that are found are stored in the overlay.