Skip to content

Commit

Permalink
Modify rpm-ostree options for new parameter
Browse files Browse the repository at this point in the history
rpm-ostree behavior has been modified, and implemented an assume yes param ie -y, implementing here.
  • Loading branch information
BeeGrech authored and thrix committed Jan 21, 2025
1 parent f558779 commit 816f1c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tests/unit/test_package_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def _parametrize_test_install() -> \
yield container, \
package_manager_class, \
Package('tree'), \
r"rpm -q --whatprovides tree \|\| rpm-ostree install --apply-live --idempotent --allow-inactive tree", \
r"rpm -q --whatprovides tree \|\| rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes tree", \
'Installing: tree' # noqa: E501

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -579,7 +579,7 @@ def _parametrize_test_install_nonexistent() -> \
elif package_manager_class is tmt.package_managers.rpm_ostree.RpmOstree:
yield container, \
package_manager_class, \
r"rpm -q --whatprovides tree-but-spelled-wrong \|\| rpm-ostree install --apply-live --idempotent --allow-inactive tree-but-spelled-wrong", \
r"rpm -q --whatprovides tree-but-spelled-wrong \|\| rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes tree-but-spelled-wrong", \
'no package provides tree-but-spelled-wrong' # noqa: E501

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -673,7 +673,7 @@ def _parametrize_test_install_nonexistent_skip() -> \
elif package_manager_class is tmt.package_managers.rpm_ostree.RpmOstree:
yield container, \
package_manager_class, \
r"rpm -q --whatprovides tree-but-spelled-wrong \|\| rpm-ostree install --apply-live --idempotent --allow-inactive tree-but-spelled-wrong \|\| /bin/true", \
r"rpm -q --whatprovides tree-but-spelled-wrong \|\| rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes tree-but-spelled-wrong \|\| /bin/true", \
'no package provides tree-but-spelled-wrong' # noqa: E501

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -771,7 +771,7 @@ def _parametrize_test_install_dont_check_first() -> \
yield container, \
package_manager_class, \
Package('tree'), \
r"rpm-ostree install --apply-live --idempotent --allow-inactive tree", \
r"rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes tree", \
'Installing: tree'

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -1356,7 +1356,7 @@ def _parametrize_test_install_filesystempath() -> Iterator[
yield container, \
package_manager_class, \
FileSystemPath('/usr/bin/dos2unix'), \
r"rpm -qf /usr/bin/dos2unix \|\| rpm-ostree install --apply-live --idempotent --allow-inactive /usr/bin/dos2unix", \
r"rpm -qf /usr/bin/dos2unix \|\| rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes /usr/bin/dos2unix", \
"Installing 1 packages:\n dos2unix-" # noqa: E501

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -1473,7 +1473,7 @@ def _parametrize_test_install_multiple() -> \
yield container, \
package_manager_class, \
(Package('tree'), Package('nano')), \
r"rpm -q --whatprovides tree nano \|\| rpm-ostree install --apply-live --idempotent --allow-inactive tree nano", \
r"rpm -q --whatprovides tree nano \|\| rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes tree nano", \
'Installing: tree' # noqa: E501

elif package_manager_class is tmt.package_managers.apk.Apk:
Expand Down Expand Up @@ -1603,7 +1603,7 @@ def _parametrize_test_install_downloaded() -> \
package_manager_class, \
(Package('tree'), Package('cowsay')), \
('tree*.x86_64.rpm', 'cowsay*.noarch.rpm'), \
r"rpm-ostree install --apply-live --idempotent --allow-inactive /tmp/tree.rpm /tmp/cowsay.rpm", \
r"rpm-ostree install --apply-live --idempotent --allow-inactive --assumeyes /tmp/tree.rpm /tmp/cowsay.rpm", \
'Installing: tree' # noqa: E501

elif package_manager_class is tmt.package_managers.apt.Apt:
Expand Down
2 changes: 1 addition & 1 deletion tmt/package_managers/rpm_ostree.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def prepare_command(self) -> tuple[Command, Command]:

command += Command('rpm-ostree')

options = Command('--apply-live', '--idempotent', '--allow-inactive')
options = Command('--apply-live', '--idempotent', '--allow-inactive', '--assumeyes')

return (command, options)

Expand Down
1 change: 0 additions & 1 deletion tmt/steps/prepare/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ def sort_packages(self) -> None:
else:
self.required_packages.append(package)

def install_debuginfo(self) -> None:
""" Install debuginfo packages """
self.warn("Installation of debuginfo packages not supported yet.")

Expand Down

0 comments on commit 816f1c4

Please sign in to comment.