Skip to content

Commit 4936360

Browse files
committed
Only run rpm --verify if pkg was a package and not a file (that is provided by a package)
This lets us request to install `/usr/sbin/semanage` without failing the verify step.
1 parent 494cf71 commit 4936360

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

osgtest/tests/special_install.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ def test_02_install_packages(self):
5959
retry_fail, _, stdout, _ = yum.retry_command(command)
6060
if retry_fail == '': # the command succeeded
6161
core.state['install.transaction_ids'].append(yum.get_transaction_id())
62-
command = ('rpm', '--verify', pkg)
63-
core.check_system(command, 'Verify %s' % (pkg))
62+
if not pkg.startswith("/"):
63+
# ^^ rpm --verify doesn't work if you asked for a file instead of a package
64+
command = ('rpm', '--verify', pkg)
65+
core.check_system(command, 'Verify %s' % (pkg))
6466
yum.parse_output_for_packages(stdout)
6567

6668
fail_msg += retry_fail

0 commit comments

Comments
 (0)