This is v2 of the 4/4 patch from the original series.
Changes:
- memoize the function this time
- check packages are installed using rpm_package_of_string
However I didn't combine the two case together, because the code is a
bit simpler with them separate.
Rich.