Ask Your Question

Revision history [back]

rpm -qf $which foo) does not work if the package is not installed.

In this case, as the OP does NOT have semanage on the system

which semanage gives me

usr/bin/which:no semanage in (...)

So in that event, use dnf

dnf provides '*/semanage'

rpm -qf $which foo) does not work if the package is not installed.

In this case, as the OP does NOT have semanage on the system

which semanage semanage gives me

usr/bin/which:no semanage in (...)

So in that event, use dnf

dnf provides '*/semanage'

rpm -qf $which foo) does not work if the package is not installed.

In this case, as the OP does NOT have semanage on the system

which semanage gives me

usr/bin/which:no semanage in (...)

So in that event, use dnf

dnf provides '*/semanage'

yields

dnf provides '*/semanage'
Last metadata expiration check performed 0:05:14 ago on Sun Dec 13 06:44:26 2015.
policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : @System

policycoreutils-python-utils-2.4-14.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : fedora

policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : updates

rpm -qf $which foo) $(which semanage) does not work if the package is not installed.

In this case, as the OP does NOT have semanage on the system

which semanage gives me

usr/bin/which:no semanage in (...)

So in that event, use dnf

dnf provides '*/semanage'

yields

dnf provides '*/semanage'
Last metadata expiration check performed 0:05:14 ago on Sun Dec 13 06:44:26 2015.
policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : @System

policycoreutils-python-utils-2.4-14.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : fedora

policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : updates