@all,
can't remember where I recently found this, but it is a handy script to list which packages have been added/updated and which have been removed (from those originally included in @david's build). It is much better than a previous script I had posted which checked packages based on times installed and took 1-5 minutes to run. This runs instantaneously and also shows removed packages.
This requires the package diffutils to be installed. (opkg update followed by opkg install diffutils) so that the command 'diff' in the script works.
@david, can you include diffutils in your next build? Much thanks!
Here's the script:
#!/bin/sh OPKG_INFO_DIR=/usr/lib/opkg/info/ OPKG_ROM_INFO_DIR=/rom/usr/lib/opkg/info/ [ ! -d "${OPKG_ROM_INFO_DIR}" ] && { echo "No ROM filesystem found!" exit 1 } package_diff="$(diff -q "${OPKG_INFO_DIR}" "${OPKG_ROM_INFO_DIR}")" echo "$package_diff" | \ sed -e "s|Only in ${OPKG_INFO_DIR}: \(.*\)\..*|Added/Modified: \1|" | \ sed -e "s|Files ${OPKG_INFO_DIR}\(.*\)\..* and ${OPKG_ROM_INFO_DIR}.* differ|Added/Modified: \1|" | \ sed -e "s|Only in ${OPKG_ROM_INFO_DIR}: \(.*\)\..*|Deleted: \1|" | \ sort | uniq
added diffutils to the build and saved a backup of .conf.
Question: We could save the script and add to the /root directory for each build. Do you think it would be best to use uci-defaults to copy the script to the /root directory?
I've put scripts in the uci-defaults directory which execute the first time the system comes up, but wasn't sure about how to handle a script to copy it to a directory without executing it. Maybe zip the script and create a quick script to unzip and copy over to the /root directory on first boot.
(Last edited by davidc502 on 25 Aug 2017, 01:13)