rpm_utils: only support packages in is_installed()
ClosedPublic

Authored by kparal on Jun 30 2017, 11:49 AM.

Details

Summary

Since Fedora 26, dnf no longer contains noroot plugin. That means we
can no longer use dnf install --assumeno under a non-root user to
check whether $foo is installed. Without this patch, all tasks fail on
F26 claiming any dependency is not installed (even when it is).

This patch replaces the former approach with dnf list --installed.
That works reliably, but only supports package names and file paths (not
groups, or package version comparisons, etc). Since there's no simple
and better solution, this approach seems satisfactory for the moment.
Thsi while code might get obsoleted very soon anyway with ansible-based
tasks.

Test Plan

works for me on F26 under non-root user

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal created this revision.Jun 30 2017, 11:49 AM
jskladan accepted this revision.Jun 30 2017, 1:05 PM
This revision is now accepted and ready to land.Jun 30 2017, 1:05 PM
Closed by commit rLTRNaea6a9c93049: rpm_utils: only support packages in is_installed() (authored by Kamil Páral <kparal@redhat.com>). · Explain WhyJun 30 2017, 1:17 PM
This revision was automatically updated to reflect the committed changes.