Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand tmt.package_managers.PackageManager with remove #3258

Open
LecrisUT opened this issue Oct 2, 2024 · 4 comments
Open

Expand tmt.package_managers.PackageManager with remove #3258

LecrisUT opened this issue Oct 2, 2024 · 4 comments

Comments

@LecrisUT
Copy link
Contributor

LecrisUT commented Oct 2, 2024

I was designing a plan for a package that has a main foo and python3-foo rpms, and I wanted to test the plan without python3-foo installed by testing-farm. The simplest interface for this would be to allow the package manger to remove packages and have an equivalent interface for prepare.install

@happz
Copy link
Collaborator

happz commented Oct 2, 2024

We can definitely add an "uninstall" action to package managers, but how to express "package python3-foo shall be uninstalled". We have require for "shall be present" and recommend for "may be present", but to remove a package, no key yet.

@martinhoyer
Copy link
Collaborator

Can't we do "negative" require? Not sure if better than adding a new absent key.

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Oct 2, 2024

One option would be to allow package to be a str or a dict, the latter accepting name, install/remove and missing for the prepare.install. I don't think we should support test.require, etc. right now, at least not until #3085 is resolved.

@happz
Copy link
Collaborator

happz commented Oct 2, 2024

Ok, so if the idea is to implement this for the prepare/install plugin first, then it shouldn't be too hard. We already have a precedent for not-just-a-string "packages", test require accepts also libraries and file paths, so yep, that wouldn't be new. It would be in prepare/install, but not in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants