Skip to content

mrtest: Add a nag script

Nikita Travkin requested to merge travmurav/nag into master

mrtest installs packages from apk files which pins the package version to the hash of the package. This means that apk would be reluctant to update packages on which .mrtest- virtual package depends.

This can cause problems to the users who may forget that they have some packages installed using mrtest, espacially if those were boot-critical packages.

Add a script that would implement an apk hook that would nag the user about installed mrtest packages. This hook should be installed in /etc/apk/commit_hooks.d/ and will be run by apk on every execution.

$ sudo apk upgrade
*
* You have some packages installed via mrtest!
*
* .mrtest-4907-postmarketOS=20240311.051020
*
* You can delete these packages with 'mrtest zap'.
*
OK: 7659 MiB in 2171 packages

The script could've called mrtest or apk to list the actual installed packages but it takes a couple of seconds of time for an otherwise instant script so I've decided to omit that.

Fixes: #13 (closed)

Merge request reports

Loading